1. 程式人生 > >這個sql是什麼意思,求解

這個sql是什麼意思,求解

insert into @tmp select Id,@Layer from MIX_單位 where Id in ( select OrgId from MIX_UserPrivilege where UserId='BE9EE1CC-1818-43FF-8F1E-02098A8F59ED' ) while @@ROWCOUNT>0 begin select @[email protected]+1 insert into @tmp select Id,@Layer from MIX_單位 where ParentId in ( select
Id from @tmp where [email protected]1 ) and Id not in ( select Id from @tmp ) end select Id from MIX_機組 where 單位Id in ( select Id from @tmp )