Hi, For a university project I've recently started to learn to use MySQL. Obviously one of the first things I did, having read numerous tutorials was to create a database and attempt to add some tables. Unfortunately I have spent the past two weeks trying to do this presumably straight forward task and am sure that I am missing something.
The problem occurs due to my wishing to place too many keywords after any attribute. If I create a simple table like: create table Products( ID int(7) unsigned not null unique zerofill default '0000000' auto_increment, primary key(ID)); I get an error message similar to: Error 1064 at line 3: You have an error in your SQL syntax near <omitted text> at line 2. After two weeks of changing combinations of keywords and deleting some and inserting others I finally found that the following command works: create table Products( ID int(7) unsigned zerofill default '0000000' not null unique auto_increment, primary key(ID)); So does anyone have any idea why the order of these keywords matters? In all the references on MySQL or SQL there is no mention of any specific order. While I've now got my first table working I'm still having difficulties getting other tables to work. Hopefully the answer to this question may shed some light on my difficulties. Thanks very much in advance. Regards, Saqib Shaikh Email: [EMAIL PROTECTED] Web site: http://www.saqibshaikh.com/ --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php