数据库
土块
自由的灵魂有颗勇敢的心.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
oracle数据库,存储过程使用游标写业务逻辑。
使用游标循环结果集,并进行相应的数据操作。declare cursor consume is select id from CM_ROLE where TERMINAL != 0;BEGINfor son in consume loop insert into CM_ROLE_MENU (ROLE_ID,MENU_ID) (select son.id, id from CM_...原创 2018-12-17 13:26:20 · 401 阅读 · 0 评论 -
使用存储过程、正则提取数字并更新排序字段
oracle使用存储过程循环更新业务所需的排序字段业务场景代码逻辑参考链接业务场景同事在导入数据的时候,将表中需要进行业务排序的字段sort冲突,导致业务显示顺序出错。现在需要更新为对的sort代码逻辑begin for item in (select id,name,ROWNUMfrom (select id,namefrom cm_thing where LINE_ID in...原创 2019-06-11 09:26:18 · 341 阅读 · 0 评论
分享