November 19th, 2000, 05:04 AM
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'"
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
November 19th, 2000, 05:57 AM
is it cause I can't use varchar and auto increment at the same time?
what's with the binary, and zerofill options?
November 19th, 2000, 06:46 AM
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:
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.