#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    -
    Posts
    1
    Rep Power
    0
    Hello!

    I am a mysql newbie here. I was working with a particular database and created two tables with no problems. then, for apparently no reason, i am not able to create a new table. here is the syntax i am using:


    CREATE TABLE Tables (Table_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT);

    but then i get a error 1064 and it says i have an error in my SQL syntax.

    this is liquifying my brain. please help me!!

    Shaheeb
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    73
    Rep Power
    15

    Sorry to hear about your brain shabba - this is probably due to the fact that you have a primary key defined
    this example creates a table called persons with a primary key and a column called name

    CREATE TABLE persons (
    id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
    name CHAR(60) NOT NULL,
    PRIMARY KEY (id)
    );

    Hope this helps
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    3
    Rep Power
    0
    CREATE TABLE Tables (
    Table_ID INT NOT NULL AUTO_INCREMENT,
    PRIMARY KEY (Table_ID ));

Similar Threads

  1. mail() ... pulling my freakin hair out !!!
    By grfxguru in forum PHP Development
    Replies: 13
    Last Post: January 29th, 2004, 03:54 AM
  2. IE6 not rendering correctly! (pulling my hair out)
    By abunch in forum HTML Programming
    Replies: 7
    Last Post: December 16th, 2003, 09:49 PM
  3. Photoshop: removing facial hair
    By tuwoha in forum Web Design Help
    Replies: 1
    Last Post: August 4th, 2003, 11:49 PM
  4. MySQL chewing up more CPU than expected...
    By Matthew Doucette in forum MySQL Help
    Replies: 3
    Last Post: August 26th, 2002, 02:18 PM
  5. pulling my hair out over these apache changes
    By hjkl in forum Apache Development
    Replies: 1
    Last Post: June 6th, 2002, 01:42 AM

IMN logo majestic logo threadwatch logo seochat tools logo