日期:2014-05-18  浏览次数:20431 次

sql 子查询
有没有办法把下面的from子查询,用其它方法实现,只要不是from子查询就可以。请大家帮忙! 
select * from (select * from user as a where a.dep='11')as b where b.name='22' or b.g='33'

------解决方案--------------------
select * from user where dep='11' and (name='22' or g='33')
------解决方案--------------------
SQL code
select * from user a       
where a.dep='11' and (a.name='22' or a.g='33')

------解决方案--------------------
SQL code
select * from [user] a       
where a.dep='11' and (a.name='22' or a.g='33')