Mysql
 sql >> Database >  >> RDS >> Mysql

database che non prende il tavolo

create table users(

empID INT,
PRIMARY KEY(empID) /*<<< ADD THIS */
);
create table `leave`(
lid INT NOT NULL AUTO_INCREMENT,
empID INT,
empname VARCHAR(255) NOT NULL,
username VARCHAR(255) NOT NULL,
nod INT NOT NULL,
sdate DATE,
edate DATE,
reason VARCHAR(255) NOT NULL,
PRIMARY KEY(lid),
FOREIGN KEY(empID) REFERENCES users(empID)
);