SQL PRIMARY KEY Constraint
The PRIMARY KEY constraint is used to uniquely identifies each record in a database table. The Primary keys in a table contains a unique values. It should contain NULL values. The Table contain a primary key and each table have only primary key.
Understand with Example
The Tutorial illustrate an example to understand SQL PRIMARY KEY Constraint. In this example, we create a table 'Stu_Class_10.The create statement is used to create a table 'Stu_Class_10'.The following SQL creates a PRIMARY KEY on the "Stu_Id" when the" Stu_Class_10" table is created.
Create Table Stu_Class_10
Insert data into Stu_Class_10
The insert into statement is used to add the records or rows to the table 'Stu_Class_10'.