感谢 http://bbs.csdn.net/topics/391048578?page=1 create table A ( [Id] [uniqueidentifier] NOT NULL, ) NULL, ) NULL ) create table B ( [Id] [uniqueidentifier] NOT NULL, [AId] [uniqueidentifier] NULL, [status] int, ) null ) Declare @Id [uniqueidentifier]…