mysql id code example
Example 1: mysql id of inserted row
-- For mysql
INSERT INTO table_name (col1, col2,...) VALUES ('val1', 'val2'...);
SELECT LAST_INSERT_ID();
Example 2: create a table with an id in mysql
CREATE TABLE DemoT (
Personid int NOT NULL AUTO_INCREMENT,
LastName varchar(111) NOT NULL,
FirstName varchar(111),
Age int,
PRIMARY KEY (Personid)
);
Example 3: create table primary key auto increment mysql
define primary key auto increment