SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table student ( stu_id int primary key, stu_name char(30), stu_branch_id int ); create table branch ( branch_id int primary key, branch_name char(30), branch_building_no int ); alter table student add constraint fk_student foreign key (stu_branch_id) references branch(branch_id); show create table student; alter table student drop foreign key fk_student; show create table student; alter table student drop key fk_student; show create table student; alter table student add constraint fk_student foreign key (stu_branch_id) references branch(branch_id); alter table student drop foreign key fk_student, drop key fk_student; show create table student;
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear