create proc Test(@项目代码 varchar(100))
as
begin
select U.*
from 用户角色信息表 U
where not exists (select 1 from 项目人员角色信息 where 项目代码=@项目代码 and 用户代码=T.用户代码)
end
as
begin
select U.*
from 用户角色信息表 U
where not exists (select 1 from 项目人员角色信息 where 项目代码=@项目代码 and 用户代码=T.用户代码)
end
where 项目代码=你传的值
and (用户代码,角色代码) not in (select 用户代码,角色代码 from 用户角色信息表)
可以吗?
-----没有这样的写法吧!!??
where 项目代码=你传的值
and (用户代码,角色代码) not in (select 用户代码,角色代码 from 用户角色信息表)
可以吗?========================
这个肯定不行
先谢谢各位了。
as
begin
select U.*
from 用户角色信息表 U
where not exists (select 1 from 项目人员角色信息 where 项目代码=@项目代码 and 用户代码=T.用户代码)
end==========
这种写法也有问题。