sql文:
select user_cd,cust_no
from (
select user_cd,cust_no
from table_name
where user_cd=1500 )
where rownum <=5在上面这个sql文中我要把查询出来的数据进行加锁 for update 不能在这里使用怎么办?
select user_cd,cust_no
from (
select user_cd,cust_no
from table_name
where user_cd=1500 )
where rownum <=5在上面这个sql文中我要把查询出来的数据进行加锁 for update 不能在这里使用怎么办?
解决方案 »
- oracle中打印 要显示的sql语句 急!
- 如何在一个表中查找姓名重复的记录
- 100分求一条数据导出语句
- 想用浏览器写Sqlplus命令,但是浏览器显示域名无法访问。
- oracle建表时能将几个字段建成一个联合项目吗?
- oracle的安装问题
- 关于导入,导出
- 查询的时候,表名可以是拼接的字符串吗?
- trigger:每次update table1,table2字段值自增1,不运行?
- 如何用rman异机恢复oracle呢?
- 备份oracle9i时出现错误,高手能来看看吗,急!!在线等待!
- [oracle高手救命]关于一个oracle客户端10g,访问2个异地oracle服务器,字符集不同的问题。
select user_cd,cust_no
from table_name
where user_cd=1500
and rownum <=5
for update;
select user_cd,cust_no
from (
select user_cd,cust_no
from table_name
where user_cd=1500
order by cust_no --这句忘加了
)
where rownum <=5sozdream
这样的话 sql文改成你写的那个样就有问题了。
select user_cd,cust_no
from table_name
where user_cd=1500
and rownum <=5
order by cust_no
for update;取出的就不是排序好了的,而是取出前5件,然后再排序。
我想要的是全部排序好了,再取出前5件。
我主要是想问,在有子查询的SELECT中for update能用吗?如果不能用的话有没有其他方法可以代替。
谢谢!
有子查询好象不能用for update.
"vc555()
up!
有子查询好象不能用for update."请问有解决的方法吗