本文介绍了如何从表中删除Handel与另一个表有关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两张桌子



&

第一张表:

i have two tables

&
First Table :

GuestId    Name     Delete
1            Magdy    Delete
2            Rana     Delete
3            Yousf    Delete







第二张表:




Second Table :

Bookingid  GuestId           Place
1             1              Paris     Delete
2             1              Amedica   Delete
3             1              Romanya   Delete





2张桌子之间有关系

Guest 1 - >有3个预订

但是

来宾2 - >没有任何书(很容易删除)





当我要删除第二个表中的任何行时没问题



当我想从第一个表中删除行时&安培;这一排预订在第二张桌子

i想告诉我(你不能删除这一行,你必须先删除所有预订)



任何人都可以帮助我



there are relations between 2 tables
Guest 1 --> Have 3 Booking
but
Guest 2 -->Haven't any book (its easy to delete)

please
when i want delete any row in Second table its no problem
but
when i want to delete row from first table & this row have booking in second table
i want to tell me that (you cant Delete this Row, you Must delete all booking at first)

any one can help me please

推荐答案


这篇关于如何从表中删除Handel与另一个表有关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 17:16