[Quote=引用 12 楼 hzcyclone 的回复:]
是的 就是你说的
假如有2个查询项 那就是有4种可能
select * from table where a=a
select * from table where b=b
select * from table where a=a and b=b
select * from table
4种情况 我大不了全部罗列出来 也无所谓
你的意思是sql语句可能是select * from table where a=a,select * from table where a=a and b=b等等查询条件不同的意思吧?不明白为什么会出现“select * from (select * from table where ……) where …… ”这种写法……
至于判断,那本身就是一定需要的。
写个实际例子?
[/Quote]
是的 就是你说的
假如有2个查询项 那就是有4种可能
select * from table where a=a
select * from table where b=b
select * from table where a=a and b=b
select * from table
4种情况 我大不了全部罗列出来 也无所谓
你的意思是sql语句可能是select * from table where a=a,select * from table where a=a and b=b等等查询条件不同的意思吧?不明白为什么会出现“select * from (select * from table where ……) where …… ”这种写法……