Mysql create table primary key autoincrement example


Mysql create table primary key autoincrement example is explained below.

Sql create table with primary key

Example

CREATE TABLE Users
(
ID int NOT NULL AUTO_INCREMENT,
Name varchar(100),
Email varchar(100),
Address varchar(100),
City varchar(100),
PRIMARY KEY (ID)
);

this will create table users with primary key ID and autoincrement functionality.


Advertisements

Add Comment

📖 Read More