Script to create a Foreign Keys on Table.

Posted by Vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 177
create table employee_master
emp_id uniqueidentifier primary key,
emp_name nvarchar(50)

create table project_master
project_id uniqueidentifier primary key,
project_emp_id uniqueidentifier not null,
project_name varchar(200) not null,
budget decimal,
foreign key(project_emp_id) references employee_master(emp_id)

Comments or Responses

Login to post response