Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

create table mysql example auto_increment

Copied
CREATE TABLE animals (
     id MEDIUMINT NOT NULL AUTO_INCREMENT,
     name CHAR(30) NOT NULL,
     PRIMARY KEY (id)
);

INSERT INTO animals (name) VALUES
    ('dog'),('cat'),('penguin'),
    ('lax'),('whale'),('ostrich');

SELECT * FROM animals;
Source by dev.mysql.com #
 
PREVIOUS NEXT
Tagged: #create #table #mysql
ADD COMMENT
Topic
Name
2+2 =