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

    Join Date
    Nov 2000
    Posts
    3
    Rep Power
    0
    I'm using phpMyAdmin to create a database table and my veh_id field in the vehicle table comes up with "incorrect column specifier for column 'veh_id'"

    why???
    the attributes for 'veh_id' were varchar, 5, primary key, not null and index
    all were correctly put into sql syntax yet this error came up -why?

    any help would be gratefully accepted

    Regards
    Dean
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    3
    Rep Power
    0
    is it cause I can't use varchar and auto increment at the same time?

    what's with the binary, and zerofill options?
  4. #3
  5. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    auto_increment can only be used on the various integer datatypes. How can you increment text? Also, you can't declare something both as primary key and index, that's redundant.

    zerofill is used when you want a numeric datatype stored with leading zeroes. So a tinyint unsigned would be stored like:

    001
    002
    003
    ...

    binary is a declaration to make any of the text datatypes store using the binary representation of text rather than ascii (the default for all but blob types). The benefit is quicker comparison, the loss is case-insensitivity.

Similar Threads

  1. Replies: 0
    Last Post: January 3rd, 2004, 08:33 AM
  2. compile vhosts
    By the-griff in forum Linux Help
    Replies: 0
    Last Post: November 5th, 2003, 08:07 PM
  3. Is it better to declare a column NULL or NOT NULL
    By lunatic in forum MySQL Help
    Replies: 6
    Last Post: October 22nd, 2003, 03:12 AM
  4. Debugging column logic
    By tlush in forum PHP Development
    Replies: 2
    Last Post: March 13th, 2003, 03:47 PM
  5. Questions about column types
    By kixx in forum MySQL Help
    Replies: 3
    Last Post: March 10th, 2003, 06:12 PM

IMN logo majestic logo threadwatch logo seochat tools logo