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
- 1. Get zip codes in radius Mysql query
- 2. SQL Prevent Duplicate INSERT - MySql
- 3. Get list of MySQL user accounts
- 4. Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'
- 5. MySQL Grant all privileges on database