我有一个查询语句,就是我要查询的信息中有3个条件,但是这三个调教在一个子查询中完全可以匹配,我应该怎么写?比如:在Oracle中可以这样写:
SELECT * FROM USERDL
WHERE (JZMM, ZDDL, SFDL) = (
SELECT JZMM, ZDDL, SFDL FROM USERDL WHERE YHM = '000'
)
,但是在SQL Server 2008中怎么写啊?
...收起
FROM USERDL a, ( SELECT JZMM, ZDDL, SFDL FROM USERDL WHERE YHM = '000' ) b where a.jzmm=b.jzmm and a.zddl=b.zddl and z.sfdl=b.sfdl 即使在oracle中也不建议用那种写法,可读性太差 SELECT * FROM USERDL WHERE YHM = '000' 就可以了
...全文