Website Scripts And Cloud Tutorials

Create table with AUTO_INCREMENT Mysql

Byadmin

Mar 15, 2014

Last updated on May 13th, 2016 at 12:23 pm

Click to rate this tutorial!
[Total: 3 Average: 4.7]

Create table with AUTO_INCREMENT Mysql

The AUTO_INCREMENT attribute can be used to generate a unique identity for new rows:

Here i am creating a simple TABLE named login_details, with COLUMNS ID, uniqid, Manager, email, Account_Name. The AUTO_INCREMENT is assigned to column named ID. It will automatically increment values starting with 1 when ever a new data is added to the table.

CREATE TABLE login_details (
     ID MEDIUMINT NOT NULL AUTO_INCREMENT,
	 uniqid MEDIUMINT,
     Manager CHAR(30),
	 email VARCHAR(255),
	 Account_Name VARCHAR(255),
     PRIMARY KEY (id)
) ENGINE=MyISAM;
Click to rate this tutorial!
[Total: 3 Average: 4.7]

Leave a Reply

Your email address will not be published.