Re: Create Table from Results of SQL Query

2008-07-03 Thread O. Olson
Thanks Dan for your quick response - it works now. I am new to SQL in general and MySQL in particular. O.O. --- Ven 4/7/08, Dan Nelson <[EMAIL PROTECTED]> ha scritto: > Da: Dan Nelson <[EMAIL PROTECTED]> > Oggetto: Re: Create Table from Results of SQL Query > A: "O

Re: Create Table from Results of SQL Query

2008-07-03 Thread Dan Nelson
In the last episode (Jul 04), O. Olson said: I have a SQL Query that > has an inner join and it is taking too long to execute. I am thinking > of speeding this up by dumping the result into a separate table - as > I would be requiring the result of this query many times in the > future. I am wonde

Re: Create table

2008-04-15 Thread Rob Wultsch
On Tue, Apr 15, 2008 at 7:27 AM, Paul DuBois <[EMAIL PROTECTED]> wrote: > > At 10:32 AM +0530 4/15/08, Krishna Chandra Prajapati wrote: > > > Hi, > > > > I have created a table name group. > > > > CREATE TABLE `group` ( > > `group_id` int(11) NOT NULL, > > `group_name` varchar(128) NOT NULL, > >

Re: Create table

2008-04-15 Thread Velen
uesday, April 15, 2008 6:27 PM Subject: Re: Create table > At 10:32 AM +0530 4/15/08, Krishna Chandra Prajapati wrote: > >Hi, > > > >I have created a table name group. > > > >CREATE TABLE `group` ( > > `group_id` int(11) NOT NULL, > > `group_name` v

Re: Create table

2008-04-15 Thread Paul DuBois
At 10:32 AM +0530 4/15/08, Krishna Chandra Prajapati wrote: Hi, I have created a table name group. CREATE TABLE `group` ( `group_id` int(11) NOT NULL, `group_name` varchar(128) NOT NULL, `date_created` datetime NOT NULL, `created_by` int(11) NOT NULL, `modified_by` int(11) default NUL

Re: Create table

2008-04-14 Thread Carlos Proal
Hi. group is a reserved word i think you must enclose the table name with single quotes (as when you created the table) in order to avoid the confusion. Carlos Krishna Chandra Prajapati wrote: Hi, I have created a table name group. CREATE TABLE `group` ( `group_id` int(11) NOT NULL,

Re: Create table

2008-04-14 Thread Ananda Kumar
Do a "show tables" and see what is the actual table name. I think "group" is a key work and hence its giving you the error. See the table names in that database. regards anandkl On 4/15/08, Krishna Chandra Prajapati <[EMAIL PROTECTED]> wrote: > > Hi, > > I have created a table name group. > > C

Re: Create Table Warning

2007-06-13 Thread dpgirago
> This is a create table statement output from mysqldump from a 4.0.24 > installation. > > Restoring on 5.0.22 gives a warning. > > Can anyone enlighten me? > > I guess I'm a little behind on my reading... > > David > > mysql> CREATE TABLE `container` ( > -> `carrier` varchar(128) NOT

RE: Create Table Warning

2007-06-13 Thread Rhys Campbell
Do a "SHOW WARNINGS" at the command line. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 13 June 2007 16:11 To: mysql@lists.mysql.com Subject: Create Table Warning This is a create table statement output from mysqldump from a 4.0.24 installation. Restoring

Re: Create Table Warning

2007-06-13 Thread Baron Schwartz
Hi , [EMAIL PROTECTED] wrote: This is a create table statement output from mysqldump from a 4.0.24 installation. Restoring on 5.0.22 gives a warning. Can anyone enlighten me? I guess I'm a little behind on my reading... David mysql> CREATE TABLE `container` ( -> `carrier` varchar(1

RE: Re: CREATE TABLE Inv_Id

2006-10-19 Thread Jerry Schwartz
Original Message- > From: Martijn Tonies [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 19, 2006 9:45 AM > To: Dan Buettner; Scott Hamm > Cc: Mysql > Subject: Re: Re: CREATE TABLE Inv_Id > > > > > > Scott, what's wrong with 'PRIMARY

Re: Re: CREATE TABLE Inv_Id

2006-10-19 Thread Martijn Tonies
> Scott, what's wrong with 'PRIMARY KEY' ? A PRIMARY KEY has nothing to do with the "uniqueidentifier" datatype. A "uniqueidentifier" is a GUID. Martijn Tonies Database Workbench - development tool for MySQL, and more! Upscene Productions http://www.upscene.com My thoughts: http://blog.upscen

Re: Re: CREATE TABLE Inv_Id

2006-10-19 Thread Dan Buettner
Scott, what's wrong with 'PRIMARY KEY' ? Dan On 10/19/06, Scott Hamm <[EMAIL PROTECTED]> wrote: Wish MySQL would have something like what Microsoft use, "uniqueidentifier" as datatype. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://li

Re: CREATE TABLE Inv_Id

2006-10-19 Thread Scott Hamm
Wish MySQL would have something like what Microsoft use, "uniqueidentifier" as datatype.

Re: CREATE TABLE Inv_Id

2006-10-16 Thread Scott Hamm
Thanks! On 10/16/06, Gabriel PREDA <[EMAIL PROTECTED]> wrote: I would try: CREATE TABLE Inv_Id ( ID INT(12) UNSIGNED ZEROFILL AUTO_INCREMENT PRIMARY KEY, MID INT NOT NULL, FOREIGN (MID) REFERENCES 'Model' (ID) ); Note the UNSIGNED and ZEROFILL flags ! -- -- -- -- -- -- -- -- -- -- -- -- --

Re: CREATE TABLE Inv_Id

2006-10-16 Thread Gabriel PREDA
I would try: CREATE TABLE Inv_Id ( ID INT(12) UNSIGNED ZEROFILL AUTO_INCREMENT PRIMARY KEY, MID INT NOT NULL, FOREIGN (MID) REFERENCES 'Model' (ID) ); Note the UNSIGNED and ZEROFILL flags ! -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Gabriel PREDA Senior Web Developer -- MySQL General Mailing

Re: CREATE TABLE Inv_Id

2006-10-16 Thread Rolando Edwards
(casecode prefix, a manufacturers id, a partnumber, and a check digit) to the table definition. - Original Message - From: Gerald L. Clark <[EMAIL PROTECTED]> To: Scott Hamm <[EMAIL PROTECTED]> Cc: Mysql Sent: Monday, October 16, 2006 2:31:47 PM GMT-0500 US/Eastern Subject: R

Re: CREATE TABLE Inv_Id

2006-10-16 Thread Scott Hamm
Alright, I'll abandon UPC, I'm trying to serialize all components i.e. video cards, keyboards, sound cards, etc and when I process these info into database I would like for it to give me the image of bar code with number on bottom and small enough to put on the metal side of components i.e. ethern

Re: CREATE TABLE Inv_Id

2006-10-16 Thread Dan Buettner
Hmmm. When the table is first created, the id number should default to starting at 1. Once the table has had entries added and deleted you can run an ALTER TABLE to reset it to 1, provided it is empty I think. There's no way to store an integer left-padded with zeros like that, however. What y

Re: CREATE TABLE Inv_Id

2006-10-16 Thread Gerald L. Clark
Scott Hamm wrote: I'm trying to create a table as follows: CREATE TABLE Inv_Id ( ID INT(12) AUTO_INCREMENT PRIMARY KEY, MID INT NOT NULL, FOREIGN (MID) REFERENCES 'Model' (ID) ); How do I make ID to start out as '0001' for UPC barcode assignment? UPC barcodes are not sequential number

Re: CREATE TABLE Failure

2006-06-27 Thread Martijn Tonies
In addition to Ben's answer... > Hi All, > > I have been repeatedly trying to create the following table - without > __ANY__ success. Looks like there is REALLY something wrong with the > MySQL engine or something! Here is the script: Posting the error itself would help. Martijn Tonies Databas

Re: CREATE TABLE Failure

2006-06-27 Thread Dan Buettner
Asif, I note 3 problems: 1 - your table is named 'order', which is a reserved word in MySQL and most other db engines. I'd suggest using a different name. If you must use 'order' for the name, enclose it in backticks, a la `order`, in the create statement. 2 - you have IDNEX instead of IND

Re: CREATE TABLE x AS with ENGINE = ARCHIVE

2006-03-28 Thread Terry Burton
On 3/28/06, Peter Brawley <[EMAIL PROTECTED]> wrote: > >I require something along the lines of this: > > >CREATE TABLE old AS SELECT * FROM request_log ENGINE=ARCHIVE > > CREATE TABLE tblname ENGINE=archive SELECT * FROM request_log; > > PB Excellent. Exactly what I need. Thanks :-) -- MySQL Gene

Re: CREATE TABLE x AS with ENGINE = ARCHIVE

2006-03-28 Thread Peter Brawley
Terry I require something along the lines of this: CREATE TABLE old AS SELECT * FROM request_log ENGINE=ARCHIVE CREATE TABLE tblname ENGINE=archive SELECT * FROM request_log; PB - Terry Burton wrote: Hi, I'm using MySQL 4.11. Is it possible to use the CREATE TABLE x AS syntax along

Re: CREATE TABLE x AS with ENGINE = ARCHIVE

2006-03-28 Thread Terry Burton
On 3/28/06, Pure Web Solution <[EMAIL PROTECTED]> wrote: > I dont think that it is possible to specify the engine when creating a table > this way, you could however create the table using the: > > CREATE TABLE old AS SELECT * FROM request_log > > and then issue an alter table command setting the e

Re: CREATE TABLE x AS with ENGINE = ARCHIVE

2006-03-28 Thread Pure Web Solution
I dont think that it is possible to specify the engine when creating a table this way, you could however create the table using the: CREATE TABLE old AS SELECT * FROM request_log and then issue an alter table command setting the engine to whatever you like. Pure Web Solution http://www.purewebso

Re: CREATE TABLE LIKE in MySQL 3.23

2005-08-17 Thread Konrad Billewicz
Jigal van Hemert spill.nl> writes: > http://dev.mysql.com/doc/mysql/en/show-create-table.html > > Use output of SHOW CREATE TABLE, modify name and execute that query. Superb solution. I didn't know that MySQL has such a command. My question was very basic. Sorry for bothering. Best regards, K

Re: CREATE TABLE LIKE in MySQL 3.23

2005-08-17 Thread Jigal van Hemert
Konrad Billewicz wrote: Hello, I would like to do thing exactly like CREATE TABLE a LIKE b. But... I have MySQL 3.23 and this command is available since 4.1. How would you handle this task using this, older MySQL? http://dev.mysql.com/doc/mysql/en/show-create-table.html Use output of SHOW C

Re: CREATE TABLE and specifying DEFAULT

2005-06-15 Thread Danny Stolle
Les Schaffer wrote: Gordon Bruce wrote: I just ran the creates on 4.0.20 on LINUX and 5.0.6 on Windows upgrading to 5.0.6 solved the problem. do i need to let MySQL developers know about this or do they monitor the list or once a release is gone, i can assume THIS problem was fixed? th

Re: CREATE TABLE and specifying DEFAULT

2005-06-13 Thread Les Schaffer
Gordon Bruce wrote: I just ran the creates on 4.0.20 on LINUX and 5.0.6 on Windows upgrading to 5.0.6 solved the problem. do i need to let MySQL developers know about this or do they monitor the list or once a release is gone, i can assume THIS problem was fixed? thanks to all for the f

Re: CREATE TABLE and specifying DEFAULT

2005-06-13 Thread Danny Stolle
Les Schaffer wrote: Gordon Bruce wrote: I just ran the creates on 4.0.20 on LINUX and 5.0.6 on Windows i was running 5.0.4 on Windows: mysql> \s -- mysql Ver 14.9 Distrib 5.0.4-beta, for Win32 (ia32) switching to 5.0.6 now. anyone wanna make a bet ;-) les schaffer eu

Re: CREATE TABLE and specifying DEFAULT

2005-06-13 Thread Danny Stolle
Les Schaffer wrote: Gordon Bruce wrote: I just ran the creates on 4.0.20 on LINUX and 5.0.6 on Windows i was running 5.0.4 on Windows: mysql> \s -- mysql Ver 14.9 Distrib 5.0.4-beta, for Win32 (ia32) switching to 5.0.6 now. anyone wanna make a bet ;-) les schaffer eu

Re: CREATE TABLE and specifying DEFAULT

2005-06-13 Thread Les Schaffer
Gordon Bruce wrote: I just ran the creates on 4.0.20 on LINUX and 5.0.6 on Windows i was running 5.0.4 on Windows: mysql> \s -- mysql Ver 14.9 Distrib 5.0.4-beta, for Win32 (ia32) switching to 5.0.6 now. anyone wanna make a bet ;-) les schaffer -- MySQL General Mailing

RE: CREATE TABLE and specifying DEFAULT

2005-06-13 Thread Gordon Bruce
I just ran the creates on 4.0.20 on LINUX and 5.0.6 on Windows and they both seem to look fine {see the SHOW CREATE TABLE's following the CREATE TABLE statements} RUN ON 4.0.20 mysql> CREATE TABLE ID ( -> mat INT UNIQUE PRIMARY KEY, -> ID_firstname CHAR(35) DEFAULT 'filler', -

Re: create table with foreign key

2005-04-29 Thread mfatene
Hi, I think it's because you added a comma after the second line in the "create table item". So this table was not created. manufacturer_id varchar(50), must be manufacturer_id varchar(50)) When done, i had no problem to create my FK (4.1.11) Mathias Selon Scott Purcell <[EMAIL PROTECTED]>:

Re: create table with foreign key

2005-04-29 Thread SGreen
Re-read the section on foreign keys (http://dev.mysql.com/doc/mysql/en/innodb-foreign-key-constraints.html). It clearly says (in the second and third bullets) that you must index the columns on both ends of a FK. Add an index to ITEM_ASSET_REL that contains id as its first term then you will

Re: Create table

2004-11-15 Thread Michael Stassen
rahul pathak wrote: Hi, I am using the "Create table select * into ..." query to create a table using two exsisting tables Do you mean "CREATE TABLE ... SELECT..." or "INSERT INTO table SELECT ..."? But the table is created with only 1000 rows, which should not be the case.Is there a config set

Re: create table....select * from table anomaly..

2004-10-19 Thread Egor Egorov
It's rather a different behaviour. We suggest to upgrade to 4.0.21 in this case. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov /

RE: Create Table Error 1071

2004-10-11 Thread Anil Doppalapudi
There might be limitation on length of index in mysql try this CREATE TABLE `adminpages` ( `adminpageid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT , `file_name` VARCHAR( 250 ) NOT NULL , `page_title` VARCHAR( 250 ) NOT NULL , PRIMARY KEY ( `adminpageid` ) , INDEX ( `file_name` , `page_title` )

Re: Create table syntax question

2004-06-16 Thread Michael Stassen
PROTECTED] Subject: Re: Create table syntax question eifion herbert (IAH-C) wrote: Hi, Probably a very basic question. I'm trying to a create a table in mySQL 4.0.15 thus: create table VACANCIES( VACREF char(6) NOT NULL PRIMARY KEY, TITLE varchar(60), LOC varchar(9), DESC text, STARTD

RE: Create table syntax question

2004-06-16 Thread eifion herbert (IAH-C)
enforce RI. > -Original Message- > From: Michael Stassen [mailto:[EMAIL PROTECTED] > Sent: 16 June 2004 16:43 > To: eifion herbert (IAH-C) > Cc: [EMAIL PROTECTED] > Subject: Re: Create table syntax question > > > > eifion herbert (IAH-C) wrote: > >

Re: Create table syntax question

2004-06-16 Thread Michael Stassen
eifion herbert (IAH-C) wrote: Hi, Probably a very basic question. I'm trying to a create a table in mySQL 4.0.15 thus: create table VACANCIES( VACREF char(6) NOT NULL PRIMARY KEY, TITLE varchar(60), LOC varchar(9), DESC text, STARTDATE date, GROUP varchar(25), CONSTRAINT fk_grp FOREIGN KEY (GROUP)

RE: Create table syntax question

2004-06-16 Thread Mike Johnson
From: eifion herbert (IAH-C) [mailto:[EMAIL PROTECTED] > Hi, > > Probably a very basic question. > > I'm trying to a create a table in mySQL 4.0.15 thus: > > create table VACANCIES( > VACREF char(6) NOT NULL PRIMARY KEY, > TITLE varchar(60), > LOC varchar(9), > DESC text, > STARTDATE date, > GR

Re: Create table results in (errno: 121)

2004-04-28 Thread Adam
Tom, More specifically, find out what the error messages means by using the `SHOW INNODB STATUS` command. This will give a description of the last error message generated by InnoDb. In your case, its definitely the foreign key that is causing the problem. As far as what it is specifically, I'd

Re: Create table results in (errno: 121)

2004-04-22 Thread beacker
> ERROR 1005: Can't create table './TNMailServer/TNSession.frm' (errno: 121) > > This is on version mysql-standard-4.0.18-pc-linux-i686 If this is on a typical linux box, errno 121 is #define EREMOTEIO 121 /* Remote I/O error */ typically relate to an NFS mounted file system. Does the

Re: Create table results in (errno: 121)

2004-04-22 Thread Tom Brown
> Is it indexed? > > And don't forget you can use the command > SHOW INNODB STATUS\G > > to show the last FK related error. ahh yes - i did not know about this command LATEST FOREIGN KEY ERROR 040422 14:39:09 Error in foreign key constraint creati

Re: Create table results in (errno: 121)

2004-04-22 Thread Martijn Tonies
Hi, > I'm trying to create a table with the following syntax > > CREATE TABLE TNSession > ( > SessionID int(11) NOT NULL auto_increment, > IPAddress varchar(50) default NULL, > Created datetime default NULL, > Expired tinyint(4) default '0', > AccountID int(11) default '0', > PRIMARY KEY (SessionI

Re: create table problems??

2004-04-19 Thread Paul DuBois
At 19:09 -0400 4/19/04, Andy B wrote: hi.. i am trying to create this table: CREATE TABLE rnjresort_events ( Id int(25) NOT NULL auto_increment, Type enum('Annual','OneTime') binary NOT NULL default 'Annual', StartDate varchar(200) binary NOT NULL default '', EndDate varchar(200) binary NO

Re: Create Table Syntax

2004-04-03 Thread Khashan
Thanks a lot, I think I have enough to validate the syntax (sort of). Ahmad Khashan Michael Stassen <[EMAIL PROTECTED]> wrote: Khashan wrote: > **None of these are "table level" modifiers** > > Sorry, I guess I used the wrong terminology. I am aware of the table > options available. What I me

Re: Create Table Syntax

2004-04-02 Thread Michael Stassen
Khashan wrote: **None of these are "table level" modifiers** Sorry, I guess I used the wrong terminology. I am aware of the table options available. What I meant is “additional definitions” after the columns have been defined. Sorry I misunderstood you. Now, do I understand that you are saying

Re: Create Table Syntax

2004-04-02 Thread Khashan
**None of these are "table level" modifiers** Sorry, I guess I used the wrong terminology. I am aware of the table options available. What I meant is “additional definitions” after the columns have been defined. Now, do I understand that you are saying that a user can specify any of :

Re: Create Table Syntax

2004-04-02 Thread Michael Stassen
Khashan wrote: Thanks for the reply. It seems like the syntax for create_table/create_definition should have 2 part-2 modifiers I think you are misreading the syntax. That is, I think you are confusing the index-related create_definitions with the table_options. 1- one part-2 'column' modifi

Re: Create Table Syntax

2004-04-01 Thread Khashan
Thanks for the reply. It seems like the syntax for create_table/create_definition should have 2 part-2 modifiers 1- one part-2 'column' modifiers for the each column. and 2- another part-2 table modifiers for the table as a whole ? ( at the end of column definitions). two questions: -- Are a

Re: Create Table Syntax

2004-04-01 Thread Rhino
- Original Message - From: "Khashan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 01, 2004 1:04 PM Subject: Create Table Syntax > > I am looking at the syntax for creating table( section 6.5.3 of the manual): > > CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(c

Re: Create table 'LIKE' ....Error 1064

2004-03-28 Thread Paul DuBois
At 7:48 -0800 3/28/04, Khashan wrote: Hello All, I have MySQL 4.0.16 on Windows 2000 pro. I am trying to create a table in an existing database. according to the manual, I can use one of these statements: 6.5.3 CREATE TABLE Syntax CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_defin

Re: CREATE TABLE IF NOT EXISTS behavior (should it add rows if the table doesn't exist?)

2004-03-02 Thread Paul DuBois
At 14:42 -0800 3/2/04, Mark Brunkhart wrote: I apologize if this has been discussed or reported as a bug (I searched a bit but couldn't find mention of it). When you create a table using the CREATE TABLE IF NOT EXISTS...SELECT syntax, what is the correct behavior if the table already exists? It sho

Re: Create Table

2004-01-28 Thread Victoria Reznichenko
Cassiano Prado Oliveira <[EMAIL PROTECTED]> wrote: > [-- text/plain, encoding 8bit, charset: iso-8859-1, 22 lines --] > > Why when i create a table like this: > CREATE TABLE `prmsnctabelas2` ( > `cdempresa` varchar(5) NOT NULL DEFAULT '', > `cdfilial` CHAR(2) NOT NULL DEFAULT '', > `nometabela`

Re: CREATE TABLE

2004-01-24 Thread Heikki Tuuri
3 PM Subject: Re: CREATE TABLE > Hi, > > > Error: > > ERROR 1005: Can't create table > > './tamiyausa/user_shipping_info.frm' (errno: > > 150) > > C:\mysql\bin>perror 150 > Error code 150: Unknown error > 150 = Foreign key constraint is inc

Re: CREATE TABLE

2004-01-23 Thread Aleksandar Bradaric
Hi, > Error: > ERROR 1005: Can't create table > './tamiyausa/user_shipping_info.frm' (errno: > 150) C:\mysql\bin>perror 150 Error code 150: Unknown error 150 = Foreign key constraint is incorrectly formed Look like your foreign keys are not properly defined. Do both tables exist? And the fi

Re: CREATE TABLE and CHECK Clause

2003-09-08 Thread Egor Egorov
"Kraan Deufe" <[EMAIL PROTECTED]> wrote: > ok here we are, > > first of all, hi to every one since i'm new to this list. > > then it's my first real advanced experience with mysql, even if i've already > used SQL Server, PostgreSQL and (kof kof) Access. > > well, then i'm trying to create a heav

Re: CREATE TABLE and CHECK Clause

2003-09-08 Thread Diana Soares
Hi, Check this first: http://www.mysql.com/doc/en/CREATE_TABLE.html On Mon, 2003-09-08 at 18:34, Kraan Deufe wrote: > hi, it's the third time i'm trying to post this message to the list.. so > please reply , even if it is for saying nothing.. only to be sure that this > mail have been distributed

Re: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread James Fryer
At 10:17 am 14/08/03, Nils Valentin wrote: The simple answer would be that the syntax says: http://www.mysql.com/doc/en/UNION.html SELECT... UNION... SELECT... Further down the page it says If you want to use an ORDER BY for the total UNION result, you should use parentheses: (SELECT a FROM ta

Re: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread Sergei Golubchik
Hi! On Aug 14, James Fryer wrote: > Assuming a legal SELECT statement, this works fine: > > CREATE TABLE Foo SELECT ... > > but this does not: > > CREATE TABLE Foo (SELECT ...) > > This is a problem for me as I'd like to use the output of a > SELECT...UNION...ORDER BY statement as input t

Re: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread Nils Valentin
FROM sensei UNION ALL > select last_name > FROM sensei) > ORDER BY e_mail; > > > -Original Message- > > From: James Fryer [mailto:[EMAIL PROTECTED] > > Sent: 14 August 2003 09:41 > > To: [EMAIL PROTECTE

RE: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread James Fryer
At 10:19 am 14/08/03, Jim Smith wrote: Are you saying that any query containing parentheses fails? No. Any query beginning with a SELECT statement in parentheses. Jim -- James Fryer / [EMAIL PROTECTED] / [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/

Re: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread Nils Valentin
Hi James, I don' t understand your question. Why do you hink you that the brackets would't work ? I tried that without any problems. Please post your code. Here is mine: SELECT * FROM sensei WHERE last_name IN (SELECT last_name FROM sensei UNION ALL select last_name FROM sensei) ORDER BY e_ma

RE: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread Jim Smith
> > Sorry, missed this. > > They do need them if you want to use ORDER BY on the result > of the UNION. > Only if you are also ordering the component parts of the union. This works create table y select * from x union select * from x order by 1 desc but this doesn't create table y selec

Re: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread James Fryer
At 09:22 am 14/08/03, Nils Valentin wrote: I don' t understand your question. Why do you hink you that the brackets would't work ? I tried that without any problems. Please post your code. Here is mine: SELECT * FROM sensei WHERE last_name IN (SELECT last_name FROM sensei UNION ALL select last_na

Re: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread James Fryer
At 10:28 am 14/08/03, Sergei Golubchik wrote: It's in the 4.0.14 changelog, and thus, is available in 4.0.14 Hmm, I am using Ver 13.5 Distrib 4.1.0-alpha, for apple-darwin6.4 (powerpc) which I should have said in the first place, sorry. So it ought to be working?!? Jim -- James Fryer / [EMA

Re: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread Nils Valentin
Hi James, The simple answer would be that the syntax says: http://www.mysql.com/doc/en/UNION.html SELECT... UNION... SELECT... And thats all there is to it ;-) ... perhaps... Exception: The only reason to use the parenthis would be with ORDER BY (as you do), but than you will need to use th

RE: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread Jim Smith
FROM sensei) ORDER BY e_mail; > -Original Message- > From: James Fryer [mailto:[EMAIL PROTECTED] > Sent: 14 August 2003 09:41 > To: [EMAIL PROTECTED] > Subject: Re: CREATE TABLE, INSERT INTO with SELECT in parentheses > > > At 09:22 am 14/08/03, Nils Val

RE: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread Jim Smith
Are you saying that any query containing parentheses fails? In that case sub selects won't work either. > -Original Message- > From: James Fryer [mailto:[EMAIL PROTECTED] > Sent: 14 August 2003 10:07 > To: [EMAIL PROTECTED] > Subject: RE: CREATE TABLE, INSERT

Re: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread Nils Valentin
James Fryer wrote: At 10:17 am 14/08/03, Nils Valentin wrote: The simple answer would be that the syntax says: http://www.mysql.com/doc/en/UNION.html SELECT... UNION... SELECT... Further down the page it says If you want to use an ORDER BY for the total UNION result, you should use parenthes

RE: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread James Fryer
At 09:47 am 14/08/03, Jim Smith wrote: But why do you need the parentheses? This was a simplified query for example purposes. The real query looks more like (SELECT ...) UNION (SELECT ...) ORDER BY ... I could rewrite this with subselects but I have found them to be slower. My question is, wh

Re: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread Sergei Golubchik
Hi! On Aug 14, James Fryer wrote: > At 10:28 am 14/08/03, Sergei Golubchik wrote: > >It's in the 4.0.14 changelog, and thus, is available in 4.0.14 > > Hmm, I am using > > Ver 13.5 Distrib 4.1.0-alpha, for apple-darwin6.4 (powerpc) > > which I should have said in the first place, sorry. So it

RE: CREATE TABLE, INSERT INTO with SELECT in parentheses

2003-08-14 Thread James Fryer
At 10:19 am 14/08/03, Jim Smith wrote: I repeat. Why do you need the parentheses? Union queries don't require them. Sorry, missed this. They do need them if you want to use ORDER BY on the result of the UNION. Jim -- James Fryer / [EMAIL PROTECTED] / [EMAIL PROTECTED] -- MySQL General Mailing

Re: create table...checksum = 1

2003-07-08 Thread Paul DuBois
At 9:35 -0400 7/8/03, DePhillips, Michael P wrote: Hey Folks I'm having a tough time finding any information in the available documentation about this feature. Does anyone out there have a bit of insight as to what exactly it does. Docs says MySQL will store a checksum for each row if this is

Re: CREATE TABLE problem ..

2003-07-07 Thread Nils Valentin
2003年 7月 7日 月曜日 18:02、Rafal Kedziorski さんは書きました: > At 17:58 07.07.2003 +0900, Nils Valentin wrote: > >2003å¹´ 7月 7æ—¥ 月曜日 17:43、Rafal Kedziorski さんは書きました: > > > hi, > > > > > > I'm porting an PostgreSQL script to MySQL. I get an error: > > > > > > Can't create table '.\m

Re: CREATE TABLE problem ..

2003-07-07 Thread Rafal Kedziorski
At 17:58 07.07.2003 +0900, Nils Valentin wrote: 2003年 7月 7日 月曜日 17:43、Rafal Kedziorski さんは書きました: > hi, > > I'm porting an PostgreSQL script to MySQL. I get an error: > > Can't create table '.\mmcms\mandant.frm' (errno: 150) > > for this tables: > > CREATE TABLE `firm` ( >`firm_id` SMALLINT

Re: CREATE TABLE problem ..

2003-07-07 Thread Nils Valentin
2003年 7月 7日 月曜日 17:43、Rafal Kedziorski さんは書きました: > hi, > > I'm porting an PostgreSQL script to MySQL. I get an error: > > Can't create table '.\mmcms\mandant.frm' (errno: 150) > > for this tables: > > CREATE TABLE `firm` ( >`firm_id` SMALLINT NOT NULL AUTO_INCREMENT, >`name`VARCHAR

Re: CREATE TABLE problem ..

2003-07-07 Thread Rafal Kedziorski
hi, I added two indexes in mandant table CREATE TABLE `mandant` ( `mandant_id`SMALLINT NOT NULL AUTO_INCREMENT, `firm_id` SMALLINT NOT NULL, `parent_id` SMALLINT, `name` VARCHAR (20) NOT NULL, `creation_date` TIMESTAMP NOT NULL, # PRIMARY KE

Re: CREATE TABLE with date as part of table name

2003-06-23 Thread Egor Egorov
"Me" <[EMAIL PROTECTED]> wrote: > > I would like to know how to create a table within MySQL at the command > prompt where the table name will be something like: > > > MyTableName_TodaysDate > > > Is this possible while at the command prompt? I am trying to create a batch > file that will creat

re: Create table with IF condition not working properly

2003-03-03 Thread Victoria Reznichenko
On Friday 28 February 2003 22:00, Scott wrote: > I have a client word database and I am attempting to create a database with > the results from a select that splits the description field based on the > spaces. > > When just executing the select command, the output is correct. When using > the cre

re: Create table, wrong datatype

2003-02-12 Thread Victoria Reznichenko
On Wednesday 12 February 2003 10:21, Ulla Wensman wrote: > When I run this script the char-fields is converted to > varchar. Row-format is dynamic. I think it is because i have a text-field > in the > script. When I change the text field to somthing else I got the datatype > char in the char-colum

Re: Create table, wrong datatype

2003-02-12 Thread Stefan Hinz
Ulla, > When I run this script the char-fields is converted to > varchar. Row-format is dynamic. I think it is because i have a text-field in > the script. This MySQL feature (silent column type change) is documented here: http://www.mysql.com/doc/en/Silent_column_changes.html Regards, -- Ste

Re: Create table, wrong datatype

2003-02-12 Thread Doug Thompson
Hello: Because you have a variable length column type (text) in the row, mysql changes char() types to varchar. This behavior is discussed in the manual in Silent Column Change Specifications under CREATE TABLE. If the stored length of these columns is an issue, you can move the variable length

Re: CREATE TABLE, NOT NULL fields, and empty strings (auto)

2003-02-10 Thread Andy Smith
On Fri, Feb 07, 2003 at 04:33:15PM -0700, [EMAIL PROTECTED] wrote: > Hi "Doug Beyer" <[EMAIL PROTECTED]>, > > I'm not sure if you have checked the manual yet, but following > links seem to be somewhat related to your query: Please could these stop. Already I have noticed various people reposting

Re: CREATE TABLE, NOT NULL fields, and empty strings

2003-02-09 Thread Stefan Hinz
Doug, > create table t1 ( id varchar(5) not null, name varchar(5) not null ); > insert into t1 ( id ) values ( "1234" ); > select count(*) from t1 where name = "";--> Result = 1 > 1) Why did the insert succeed since the "name" field is not null and I didn't >provide a value? > 2)

Re: CREATE TABLE, NOT NULL fields, and empty strings

2003-02-09 Thread Doug Thompson
On Thu, 6 Feb 2003 12:05:03 -0500, Doug Beyer wrote: > >I create the following table: > >create table t1 ( id varchar(5) not null, name varchar(5) not null ); > >I insert the following row: > >insert into t1 ( id ) values ( "1234" ); > >I do the following selects: > >select count(*) from t1 where n

Re: CREATE TABLE, NOT NULL fields, and empty strings

2003-02-09 Thread R. Hannes Niedner
On 2/6/03 9:05 AM, "Doug Beyer" <[EMAIL PROTECTED]> wrote: > I attempted to search various places for my answer but with no luck. So I'm > posting here. > > > > I create the following table: > > create table t1 ( id varchar(5) not null, name varchar(5) not null ); > > > I insert the followin

Re: CREATE TABLE, NOT NULL fields, and empty strings

2003-02-09 Thread Philipp Specht
Doug Beyer wrote: create table t1 ( id varchar(5) not null, name varchar(5) not null ); insert into t1 ( id ) values ( "1234" ); select count(*) from t1 where name is null; --> Result = 0 select count(*) from t1 where name = ""; --> Result = 1 Questions: 1) Why did the insert succeed sinc

Re: CREATE TABLE, NOT NULL fields, and empty strings (auto)

2003-02-09 Thread mysql-list
Hi "Doug Beyer" <[EMAIL PROTECTED]>, I'm not sure if you have checked the manual yet, but following links seem to be somewhat related to your query: * http://www.mysql.com/doc/en/Problems_with_NULL.html * http://www.mysql.com/doc/en/CREATE_TABLE.html * http://www.mysql.com

RE: CREATE TABLE issue?

2002-12-20 Thread Adolfo Bello
Missing TYPE=INNODB in create table statement. MySQL parses references for type MyISAM but doesn't use them. Adolfo > -Original Message- > From: Jeff Snoxell [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 20, 2002 1:14 PM > To: [EMAIL PROTECTED] > Subject: CREATE TABLE issue? > >

Re: CREATE TABLE issue?

2002-12-20 Thread Paul DuBois
At 17:13 + 12/20/02, Jeff Snoxell wrote: Hi again :) I found the following mysql stuff in the MySQL manual in a section explaining how to do relationships. CREATE TABLE persons ( id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, name CHAR(60) NOT NULL, PRIMARY KEY (id) ); CREATE TA

re: create table ... select ... w/ index

2002-12-12 Thread Egor Egorov
On Thursday 12 December 2002 05:52, Amittai Aviram wrote: > When you copy a table using CREATE TABLE ... SELECT ..., the indexes do not > get copied automatically. Is there a convenient way to transfer all > indexes, other than looking them up with DESCRIBE or SHOW INDEX and then > using either A

RE: CREATE TABLE and CHECK clausole

2002-12-03 Thread Victor Pendleton
ent: Tuesday, December 03, 2002 7:42 AM > To: Achille M. Luongo; MySQL Mailinglist > Subject: Re: CREATE TABLE and CHECK clausole > > > On 12/3/02 4:32 AM, "Achille M. Luongo" > <[EMAIL PROTECTED]> wrote: > > > Dear Sir, > > > > I have trie

RE: CREATE TABLE and CHECK clausole

2002-12-03 Thread Jon Frisby
o: Achille M. Luongo; MySQL Mailinglist > Subject: Re: CREATE TABLE and CHECK clausole > > > On 12/3/02 4:32 AM, "Achille M. Luongo" > <[EMAIL PROTECTED]> wrote: > > > Dear Sir, > > > > I have tried with FLOAT or DECIMAL data types, but MySQL &

Re: CREATE TABLE and CHECK clausole

2002-12-03 Thread R. Hannes Niedner
On 12/3/02 4:32 AM, "Achille M. Luongo" <[EMAIL PROTECTED]> wrote: > Dear Sir, > > I have tried with FLOAT or DECIMAL data types, but MySQL always returns the > same error. After your suggestion, I double checked the MySQL data types > definition list and the INTEGER (alias INT) data type is supp

re: CREATE TABLE and CHECK clausole

2002-12-03 Thread Egor Egorov
Achille, Tuesday, December 03, 2002, 11:08:19 AM, you wrote: AML> MySQL seems to support the CHECK() clausole in the implementation of CREATE AML> TABLE statement, but MySQL (Ver 11.15 Distrib 3.23.39, for pc-linux-gnu) AML> returns a syntax error on such a command. For example: AML> mysql> CREAT

Re: CREATE TABLE and CHECK clausole

2002-12-03 Thread R. Hannes Niedner
Maybe it's just to late for me to think clearly but there are NO INTEGERS between 0 and 1, try FLOAT or DECIMAL. Best/h On 12/3/02 1:08 AM, "Achille M. Luongo" <[EMAIL PROTECTED]> wrote: > Dear subscribers, > > MySQL seems to support the CHECK() clausole in the implementation of CREATE > TABLE

  1   2   >