Saturday, July 16, 2011

Create table with auto increament id

i always use sql code to create table with auto increament id, because some times some servers dont allow to do one with auto increament id.

here is a code to do that:

CREATE TABLE animals (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id)
) ENGINE=MyISAM;

No comments:

Post a Comment