[求助]多表的删除问题
下面的语句可以做单表删除,但是在做多表删除的时候,就提示"逗号"(table1和table2之间的)附近有错误。在做这样的删除的时候有什么办法吗?
CREATE PROCEDURE [dbo].[shanchu]
@uid varchar(50)
as
delete from table1, table2 where table1.uid=table2.uid and table1.uid=@uid
go
你的意思是不是:
[dbo][shanchu1]
@uid varchar(50)
as
delete from table1 where table1.uid=@uid
[dbo][shanchu2]
@uid varchar(50)
as
delete from table2 where table2.uid=@uid
[dbo][shanchu]
as
begin
execute [dbo][shanchu1]
end
begin
execute [dbo][shanchu2]
end
[此贴子已经被作者于2006-9-20 11:48:46编辑过]