Hi

Sorry for this question but this is my first shot at this list.

I have created a table that contains the following:
CREATE TABLE liggare (raknare INT(10) UNSIGNED ZEROFILL DEFAULT '0000000000' NOT NULL,

 projno INT(5) UNSIGNED ZEROFILL DEFAULT '10000' NOT NULL,

 ritnummer INT(8) UNSIGNED ZEROFILL DEFAULT '' NOT NULL,

utgava INT(2) UNSIGNED ZEROFILL DEFAULT '01' NOT NULL,

besk CHAR(50) DEFAULT '' NOT NULL,

kund CHAR(50) DEFAULT '' NOT NULL,

utdatum CHAR(20) DEFAULT '' NOT NULL, utsign CHAR(5) DEFAULT '' NOT NULL,

ritad CHAR(5) DEFAULT '' NOT NULL, operativ CHAR(10) DEFAULT 'Genius 14' NOT NULL,

sokvag CHAR(100) DEFAULT '' NOT NULL,

PRIMARY KEY(raknare)); 

Now I try to create another table with colums from the first table like this:

CREATE TABLE godkann (raknare, projno) AS (SELECT raknare, projno FROM liggare);

And I got this error:

ERROR 1064: You have an error in your SQL syntax near ' projno) AS (SELECT raknare, 
projno FROM liggare)' at line 1



I'm running MySQL-3.23.38.



Regards

Jonas Arvidsson

Reply via email to