SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table staff like sakila.staff; insert into staff select * from sakila.staff; create table department ( department_id int auto_increment primary key , name varchar(64) ); insert into department (name) values ('Management'),('Sales'); alter table staff add department_id int not null; alter table staff add FOREIGN KEY (department_id) REFERENCES staff(department_id);

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear