Reputation: 285
I have onetables empadd. Now i want to create an another table named leave that connects empadd to make a relation. But while doing this i get the below error,
code create table leave(LeaveId int not null auto_increment,LeaveType varchar(255),Department varchar(255),FromDate varchar(255),ToDate varchar(255),Days int,Reason varchar(255),primary key(LeaveId),foreign key(EmployeeId) references empadd(EmployeeId));
Error
Upvotes: 0
Views: 65