select * from (select * from jw_xsxxb order by sys_guid()) where rownum < X;  --在表中随机获得x条数据

update journalarticle t set t.content = replace (t.content ,’localhost’,’www.baidu.com’) where 1=1; --替换clob文件中的数据

select c.p as xsbh from (select t.xsbh, lag(t.xsbh, 1, 0) over(order by t.xh) as p  from (SELECT T.XSBH FROM JW_XSKSCJXXB T GROUP BY T.XSBH) t) c  where c.xsbh = 指定学生编号; --查询指定学生编号的上一条数据

select c.p as xsbh from (select t.xsbh, lead(t.xsbh, 1, 0) over(order by t.xh) as p  from (SELECT T.XSBH FROM JW_XSKSCJXXB T GROUP BY T.XSBH) t) c  where c.xsbh = 指定学生编号; --查询指定学生编号的下一条数据

--可以将lag换成lead实现下一条数据,也可以使用xsbh desc的形式实现下一条数据

 

posted on 2020-06-04 09:54  ContinueW  阅读(27)  评论(0)    收藏  举报