oracle环境select workflow_requestbase.requestname,
workflow_requestbase.requestid,
workflow_requestbase.workflowid,
workflow_requestbase.creater,
workflow_requestbase.createdate,
workflow_currentoperator.receivedate from workflow_requestbase
where exists (select 1
from workflow_currentoperator
where requestid = workflow_requestbase.requestid)
and status is not null
and workflow_requestbase.workflowid > 1
order by createdate desc
现在 问题就在红色的标记哪里, 我想得到workflow_currentoperator里的某一个字段 怎么写?
其他的地方 都没问题,望高人 指点。感谢不尽!
workflow_requestbase.requestid,
workflow_requestbase.workflowid,
workflow_requestbase.creater,
workflow_requestbase.createdate,
workflow_currentoperator.receivedate from workflow_requestbase
where exists (select 1
from workflow_currentoperator
where requestid = workflow_requestbase.requestid)
and status is not null
and workflow_requestbase.workflowid > 1
order by createdate desc
现在 问题就在红色的标记哪里, 我想得到workflow_currentoperator里的某一个字段 怎么写?
其他的地方 都没问题,望高人 指点。感谢不尽!
解决方案 »
- ORACLE10g+ASM 修改processes,重启无法生效,why?
- oracle 9i 数据循环验证
- 求指点win2003,vmware7.1.4,oracle10g,做rac报错
- ORACLE读取SQL SERVER数据表(分不多了)
- aix下oracle function call c问题
- 如何查询表随意返回5条记录
- 请教高手,写一个查询语句?!
- 问什么setAutoCommit没有作用
- 求助SQL SERVER下的Set NOCOUNT ON对应Oracle下的命令是什么?
- (500分求助!)一些关于Oracle Form Developer的一些简单问题, 在线等待....
- cmd怎样连接oracle数据库
- ------请教远程访问数据库问题--------------
workflow_requestbase.requestid,
workflow_requestbase.workflowid,
workflow_requestbase.creater,
workflow_requestbase.createdate,
workflow_currentoperator.receivedate from workflow_requestbase,workflow_currentoperator
where exists (select 1
from workflow_currentoperator
where requestid = workflow_requestbase.requestid)
and status is not null
and workflow_requestbase.workflowid > 1
order by createdate desc
workflow_requestbase.requestid,
workflow_requestbase.workflowid,
workflow_requestbase.creater,
workflow_requestbase.createdate,
(SELECT max(receivedate) FROM workflow_currentoperator WHERE workflow_currentoperator.requestid = workflow_requestbase.requestid)
from workflow_requestbase
where exists (select 1
from workflow_currentoperator
where requestid = workflow_requestbase.requestid)
and status is not null
and workflow_requestbase.workflowid > 1
order by createdate desc
假设第一个表10万数据,第二个表5万,那么你这样查,结果就是10万*5万 50亿啊 不慢才怪
你在where里要加一个两个表的关联
或者像楼上那样也行