
oracle sql
老鼠拧刀满街找猫
微信公众号:Cooking Regex
正则学习分享
展开
-
查询Oracle表结构信息(走数模用)
select '新增字段' as "变更类型", '系统' as "信息系统名称", 'DEKBGMS' as "数据库名称", c.TABLE_NAME as "物理实体名称", (select men.COMMENTS from user_tab_comments men where men.Table_Name = c.Table_Name) as "物理实体描述", c.COLUMN_NA..原创 2020-07-28 14:34:27 · 285 阅读 · 0 评论 -
oracle 在一张日志表中,同一个ID 有多条记录,每个ID只获取最新时间的记录
select c.object_id, c.total_time,c.total_count from (select t.*, row_number() over(partition by t.object_id order by t.total_time desc) rn from t_dcmt_dbobj_log t) c where rn = 1原创 2015-12-14 08:56:25 · 6690 阅读 · 1 评论