如何使用存储过程删除多个表中的所有记录

问题描述:

如何使用存储过程删除多个表中的所有记录。



i有3个表

数据(lot_no,类型,形状,大小,地方,重量,dt)

sort(lot_no,名称,类型,形状,大小,地点,重量,issue_dt)

fullsort(lot_no,名称,类型,形状) ,大小,地点,重量,issue_dt,return_dt)



这里所有列都是常见的,除了name,dt,issue_dt,return_dt。

name和issue_dt存在于sort和fullsort表中,而不存在于数据表中。

return_dt列存在于fullsort表中但在其他表中不存在



现在我想删除所有表中所有列的所有记录,使用vb.net中的1删除按钮和后端使用存储过程。



我该怎么做?



任何人都可以帮我。

how to delete all records in multiple tables using stored procedure.

i have 3tables
data(lot_no,type,shape,size,place,weight,dt)
sort(lot_no,name,type,shape,size,place,weight,issue_dt)
fullsort(lot_no,name,type,shape,size,place,weight,issue_dt,return_dt)

here all the columns are common except name,dt,issue_dt,return_dt.
name and issue_dt is present in sort and fullsort table which is not there in data table.
return_dt column is present in fullsort table but absent in other tables

now i want to delete all the records of all the columns of all the tables using 1 delete button in vb.net and at back end using stored procedure.

how do i do it?

can anyone help me please.

没有命令从多个表中删除数据。唯一的选择是单独删除它们。
There is no command to delete data from multiple tables. Only option is to delete them individually.