Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

foreign key

CREATE TABLE Employee(
    EmployeeID int NOT NULL,
    LastName varchar(50) NOT NULL,
    FirstName varchar(20) NOT NULL,
    Age int,
    DeptNo int,
    PRIMARY KEY (EmployeeID),
    FOREIGN KEY (DeptNo) REFERENCES Department(DeptNo)
);
Source by www.computerscienceai.com #
 
PREVIOUS NEXT
Tagged: #foreign #key
ADD COMMENT
Topic
Name
5+9 =