青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

Prayer

在一般中尋求卓越
posts - 1256, comments - 190, trackbacks - 0, articles - 0
  C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

外鍵 刪除

Posted on 2010-05-09 18:15 Prayer 閱讀(235) 評論(0)  編輯 收藏 引用 所屬分類: DB2
DELETE Rules
When you delete a row from a parent table, the database manager checks if there
are any dependent rows in the dependent table with matching foreign key values. If
any dependent rows are found, several actions can be taken. You determine which
action will be taken by specifying a delete rule when you create the dependent
table.

RESTRICT — This rule prevents any row in the parent table from being deleted if
any dependent rows are found. If you need to remove both parent and dependent
rows, delete dependent rows first.
• NO ACTION — This rule enforces the presence of a parent row for every child
after all the referential constraints are applied. This is the default. The difference
between NO ACTION and RESTRICT is based on when the constraint is enforced.
See the DB2 SQL Reference for further details.
• CASCADE DELETE — This rule implies that deleting a row in the parent table
automatically deletes any related rows in the dependent table.
• SET NULL — This rule ensures that deletion of a row in the parent table sets the
values of the foreign key in any dependent row to null (if nullable). Other parts
of the row are unchanged.


UPDATE Rules
The database manager prevents the update of a unique key of a parent row. When
you update a foreign key in a dependent table and the foreign key is defined with
NOT NULL option, it must match some value of the parent key of the parent table.
Two options exist:
• RESTRICT — The update for the parent key will be rejected if a row in the
dependent table matches the original values of the key.
• NO ACTION — The update operation for the parent key will be rejected if any row
in the dependent table does not have a corresponding parent key when the
update statement is completed (excluding after triggers). This is the default


在更新父表中的鍵值時,可以指定兩條規則:RESTRICT 和 NO ACTION。如果從屬表中有從屬行,則 RESTRICT 不允許更新鍵值。如果在更新完成時在從屬表中有從屬行,而從屬行在父表中沒有父鍵,則 NO ACTION 將導致對父鍵值的更新操作被拒絕

RESTRICT 是在更新之前限制,
NO ACTION 是在更新之后限制,
結果一樣,判斷的時間點不同

簡單地說 On delete no action 和 ON DELETE RESTRICT 的區別不大,ON DELETE RESTRICT 要比 On delete no action 的檢查條件嚴格些
書上抄來的解釋(注意,解釋幾乎完全相同,唯一區別在于檢查鍵關聯的時間一個是 after,一個是 before):

ON DELETE NO ACTION. This definition ensures that whenever a delete operation is performed on the parent table of a referential constraint, the value for the foreign key of each row in the child table will have a matching value in the parent key of the parent table (after all other referential constraints have been applied).


ON DELETE RESTRICT. This definition ensures that whenever a delete operation is performed on the parent table of a referential constraint, the value for the foreign key of each row in the child table will have a matching value in the parent key of the parent table (before any other referential constraints are applied).

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            91久久精品国产91久久| 亚洲日本国产| 国内精品久久久久影院优 | 一道本一区二区| 亚洲国产欧美一区二区三区同亚洲 | 亚洲伦理网站| 欧美电影在线| 国产一区二区三区网站| 亚洲精品乱码久久久久久日本蜜臀| 久久精品国产欧美激情| 免费亚洲网站| 亚洲美女中出| 久热精品视频在线观看| 欧美日韩在线播放| 亚洲狼人综合| 亚洲精品久久久久久一区二区 | 欧美日韩不卡视频| 亚洲精品美女在线| 欧美激情国产高清| 久久一区二区三区国产精品| 国产精品乱码| 午夜亚洲影视| 欧美一区二区三区久久精品茉莉花 | 亚洲在线播放电影| 国产精品黄页免费高清在线观看| 亚洲免费成人| 一区二区三区视频在线看| 国产精品久久影院| 亚洲欧美日韩精品久久| 亚洲一区二区视频| 国产午夜精品久久久久久久| 久久米奇亚洲| 久久久久久久国产| 亚洲国产黄色片| 久久成人18免费观看| 亚洲免费电影在线观看| 亚洲精品日韩久久| 久久久久久一区| 欧美日韩精品久久久| 欧美在线影院| 欧美成人精品h版在线观看| 宅男噜噜噜66一区二区66| 美女脱光内衣内裤视频久久网站| 欧美精品 日韩| 在线成人欧美| 久久成人国产| 亚洲男女自偷自拍图片另类| 欧美精品一区二区三区四区| 黄色成人av网| 国语自产精品视频在线看一大j8| 欧美黄色视屏| 久久这里只有| 国产精品一区在线观看你懂的| 亚洲日本成人女熟在线观看| 久久精品女人天堂| 亚洲一本视频| 国产日韩欧美在线播放| 久久综合九色欧美综合狠狠| 一本一本久久a久久精品综合麻豆| 久久伊人一区二区| 亚洲图片在区色| 欧美欧美全黄| 亚洲黄色性网站| 欧美国产日韩一二三区| 欧美在线视频观看| 久久一区视频| 亚洲男人的天堂在线| 99pao成人国产永久免费视频| 欧美国产极速在线| 在线观看一区| 男同欧美伦乱| 麻豆freexxxx性91精品| 在线看日韩av| 在线亚洲免费视频| 久久久久网址| 亚洲高清资源综合久久精品| 欧美aa国产视频| 久久综合伊人77777蜜臀| 一区二区在线看| 欧美高清视频www夜色资源网| 美日韩丰满少妇在线观看| 国产精品vvv| av成人天堂| 国产麻豆精品theporn| 欧美在现视频| 久久久久看片| 久久久久国内| 91久久久久久国产精品| 免费在线看成人av| 99精品欧美一区二区三区| 欧美日韩国产123区| 亚洲一区二区视频在线| 亚洲一区二区三区色| 国产一区成人| 欧美激情aaaa| 国产精品地址| 亚洲欧美日韩综合| 国产在线一区二区三区四区| 欧美激情亚洲自拍| 欧美日韩一区二区在线观看| 性做久久久久久久免费看| 欧美伊久线香蕉线新在线| 亚洲第一中文字幕| 欧美在线二区| 激情成人av在线| 亚洲激情在线激情| 国产精品久久久久久久午夜| 久久精品国产77777蜜臀| 久久另类ts人妖一区二区| 一区二区三区精密机械公司| 亚洲午夜久久久| 国产精品久久九九| 性8sex亚洲区入口| 亚洲激情一区二区| 亚洲一区二区三区中文字幕在线| 亚洲福利电影| 亚洲一区一卡| 蜜桃av综合| 亚洲人体影院| 日韩一区二区高清| 好吊一区二区三区| 日韩视频一区二区三区在线播放免费观看 | 亚洲精品色图| 国产美女精品一区二区三区| 久久伊人精品天天| 久久国产毛片| 你懂的一区二区| 国产精品乱看| 亚洲精品看片| 在线欧美福利| 久久精品国产精品亚洲| 亚洲一区免费| 免费永久网站黄欧美| 欧美精品一卡二卡| 伊人久久大香线蕉综合热线| 久久久久久9| 久久裸体艺术| 国产亚洲成精品久久| 亚洲精品系列| 亚洲黄色在线视频| 亚洲成人自拍视频| 国产一区二区三区四区三区四| 这里只有精品视频| 一区二区三区久久精品| 欧美a级一区二区| 麻豆精品精华液| 国产亚洲日本欧美韩国| 亚洲图片在线观看| 一区二区在线观看视频| 国产精品久久一区主播| 中文精品视频| 亚洲字幕一区二区| 国产精品久久久久久影视| 在线视频欧美日韩精品| 一区二区三区.www| 亚洲夜晚福利在线观看| 亚洲每日更新| 99热免费精品在线观看| 欧美激情国产高清| 亚洲人成欧美中文字幕| 亚洲三级电影在线观看| 欧美激情中文字幕乱码免费| 亚洲丰满在线| 亚洲区一区二| 欧美激情第10页| 在线一区视频| 久久久久久久久一区二区| 狠狠v欧美v日韩v亚洲ⅴ| 久久精品最新地址| 欧美日韩亚洲一区二区三区在线 | 日韩午夜av电影| 欧美肥婆在线| 一区二区三区精品视频| 99国产精品久久久久久久| 久久国产综合精品| 欧美专区福利在线| 米奇777超碰欧美日韩亚洲| 亚洲国产高清aⅴ视频| 美乳少妇欧美精品| 日韩视频在线观看免费| 午夜伦欧美伦电影理论片| 久久中文久久字幕| 久久久久久久久久久久久久一区| 亚洲高清在线精品| 亚洲校园激情| 国产一区二区三区成人欧美日韩在线观看| 午夜一级在线看亚洲| 免费在线国产精品| 亚洲国产高清自拍| 亚洲一区二区三区高清 | 免费观看在线综合色| 一区二区三区在线观看欧美| 久久综合九色| 亚洲精品裸体| 久久精品人人做人人爽电影蜜月| 在线看日韩欧美| 国产精品人人做人人爽人人添| 久久久之久亚州精品露出| 欧美激情一区二区三区在线视频观看 | 精品69视频一区二区三区|