primary key as column code example
Example 1: primary key sql
CREATE TABLE student
(
Roll integer (15) NOT NULL PRIMARY KEY,
Name varchar (255),
Class varchar (255),
Contact No varchar (255),
);
Example 2: primary key in sql
The PRIMARY KEY constraint uniquely identifies each record in a table.
Primary keys must contain UNIQUE values, and cannot contain NULL values.
A table can have only ONE primary key; and in the table, this primary key can consist of single or multiple columns (fields).