Skip to content

Primary Keys

Armoghan edited this page Jul 25, 2022 · 1 revision

Primary Keys

Declaring Primary Keys

-- Declaring Primary Key For Administartor Table

Alter TABLE Admin
 CONSTRAINT PK_Admin PRIMARY Key (Admin_ID)

________________________________________________________________________________

-- Declaring Primary Key For Student Table

Alter TABLE Student
 CONSTRAINT PK_Student PRIMARY Key (Student_ID)
________________________________________________________________________________

-- Declaring Primary Key For Department  Table

Alter TABLE Department
 CONSTRAINT PK_Department PRIMARY Key (Department_ID)
________________________________________________________________________________

-- Declaring Primary Key For Course Table

Alter TABLE Coures
 CONSTRAINT PK_Course PRIMARY Key (Course_ID)
________________________________________________________________________________

-- Declaring Primary Key For Teacher Table

Alter TABLE Teacher
 CONSTRAINT PK_Teacher PRIMARY Key (Teacher_ID)
________________________________________________________________________________

-- Declaring Primary Key For Exam  Table

Alter TABLE Exam  
CONSTRAINT PK_Exam  PRIMARY Key Exam _ID)
________________________________________________________________________________

-- Declaring Primary Key For Fee  Table

Alter TABLE Fee  
CONSTRAINT PK_Challan_No  PRIMARY Key Challan_No)
________________________________________________________________________________
Clone this wiki locally