两个sql table相互关联删除 |
答題得分者是:yubad2000
|
luowy651
高階會員 發表:257 回覆:313 積分:114 註冊:2003-04-09 發送簡訊給我 |
|
yubad2000
中階會員 發表:0 回覆:44 積分:78 註冊:2007-09-30 發送簡訊給我 |
For MS-SQL or Oracle Database,
Set delete trigger on table1 to delete data in table2. For MS Access, In database relationship diagram, set relationship between table1 and table2 and check the force delete box. Or, you can handle it at front-end, write some code in OnDelete even handler of table1. ===================引 用 luowy651 文 章=================== 请问各位大大: 小弟又有问题求教,比如我有两个sql 的table1和table2,如何设定成当我删除table1中的资料时,table2中的相关资料也一并删除? 不胜感激!
------
===波士頓夜未眠=== What a wonderful world!! Jazz up the world with jazz!! ================== When I am not programming... you can find me here: http://www.holy-war.de/EN/World3/bin/?advertiser=63190 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |