首页 > 代码库 > 20170802上课随笔

20170802上课随笔

deptno int constraint emp_deptno_fk references dept(deptno))级联约束

    deptno int constraint emp_deptno_fk references dept(deptno) on delete set null)或者on delete cascade//级联删除

 

ALTER TABLE test_phone_tab disable constraint test_phone_pk; //禁用约束

ALTER TABLE test_phone_tab enable constraint test_phone_pk; //启用约束

20170802上课随笔