select * from
(select * from a where b.sales_id=c.user_id and b.x is not null) ta
(select * from a where b.sales_id=c.user_id and b.x is null) tb
(select * from a where b.sales_id=c.user_id and b.x is not null) ta
(select * from a where b.sales_id=c.user_id and b.x is null) tb
解决方案 »
- 【求救】Oracle语句
- where 条件中含有子查询的效率问题
- 存储过程
- 从2,3个表中查询数据,添加到另外一张表的procedure 或function怎么写?
- 执行下面的procedure时提示我“ORA-01031:权限不足”,应该如何改写下面的procedure呢?
- 哪里有oracle10的电子书下载
- oracle是否有源码下载呢?请问
- 如何使用tree的控件
- 北京泰思达公司诚聘DELPHI+数据库高手!!!!!!!!!!!!!!!!!!!!!!
- 关于如何转换字段问题
- Oracle中有没有类似SQL Server中Space(10)这样的函数?
- oracle中有类似sql Server中top n的函数吗?你们说的rowNum不行,它不是排序后的n行
我的好像還是沒有選出我要的數據...
select * from
(select * from a where b.sales_id=c.user_id and b.x is not null) ta
(select * from b where a.sales_id=c.user_id and b.x is null) tb
到時我怎麼區分哪個是用b.sales_id=c.user_id還是a.sales_id=c.user_id查詢出來的...
select * from
(select '空',a.* from a where b.sales_id=c.user_id and b.x is not null) ta
(select ‘不空’,b.* from b where a.sales_id=c.user_id and b.x is null) tb
select * from
(select '空',c.user_name as C1 from b,c
where b.sales_id=c.user_id and c.x is null
union
select '非空',c.user_name as C1 from a,c
where a.sales_id=c.user_id and c.x is not null )