一个超奇怪的C#执行SQL语句问题
SQL语句如下:
select * from ArchProc where (ArchID=@ArchID and JobCode not like @JobCode) and (StepLevel>(select StepLevel from ArchProc where JobCode like @JobCode))
执行后无论如何都没有返回的记录;但在查询分析中执行有三条记录;
但改成如下语句就正常啦,请问是怎么回事?
select * from ArchProc where (ArchID=@ArchID and JobCode not like @JobCode) and (StepLevel>3)