这是同一个表TB里的
第一个查询
select * from TB where a > "XXX"
第二个查询
select * from TB where b > "YYY"
除了select * from TB where a> "XXX" and b>"YYY" 还有什么方法取上面两个查询的交集?
我想实现参数化的查询
但不会写SQL
第一个查询
select * from TB where a > "XXX"
第二个查询
select * from TB where b > "YYY"
除了select * from TB where a> "XXX" and b>"YYY" 还有什么方法取上面两个查询的交集?
我想实现参数化的查询
但不会写SQL
intersect
select * from TB where b > "YYY"
http://www.oklinux.cn/html/sql/oracle/20070325/12304.html
sql+="and xxxxxx";if 条件二:
sql+="and yyyyyy";……