Home > SQL > SQL PRIMARY KEY

SQL PRIMARY KEY

SQL PRIMARY KEY uniquely identifies each record in a database table.

Primary keys must contain unique values and  primary key column cannot contain NULL

values. A table can not have more than one primary key .

Example

mysql> CREATE TABLE  `new_users` (`id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, PRIMARY KEY (`id`));
Query OK, 0 rows affected (0.10 sec)


EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Beginner's Guide....
Categories: SQL Tags: , , , ,
Comments are closed.

Switch to our mobile site