5
Answers

References Key in SQL

hi
please help me
  1. use hospital_database  
  2. go  
  3. CREATE TABLE Department (  
  4. DepartmentID int NOT NULL,  
  5. Name varchar(30),  
  6. EmployeeID int ,  
  7. Primary Key (DepartmentID),  
  8. FOREIGN KEY (EmployeeID) REFERENCES Physician(EmployeeID)  
  9. );  
this is my table Structure
my question is How will you cross check this
i need insert a data right?
try to enter the employeeid which is not phyisician table
i dont know please send me a query
and iam also give physician table structure:
EmployeeID int not null, it should be primary key
Name varchar(30),
Position varchar(200),
SSN Numeric(9,0)
Answers (5)