0
How to make primary key auto increment using query
CREATE TABLE Persons ( ID int NOT NULL AUTO_INCREMENT, LastName varchar(255) NOT NULL, FirstName varchar(255), Address varchar(255), City varchar(255), PRIMARY KEY (ID) )
2 Respuestas
+ 2
above query is correct
0
create table <table_name>
(id INT AUTO_INCREMENT PRIMARY KEY
,first_name VARCHAR(255));
alternate syntax when we are not creating composite primary key.