![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql
奋斗小牛
这个作者很懒,什么都没留下…
展开
-
extract()sql抽取时间函数
SELECT EXTRACT(YEAR FROM SYSDATE) FROM DUAL; SELECT EXTRACT(MONTH FROM SYSDATE) FROM DUAL; SELECT EXTRACT(DAY FROM SYSDATE) FROM DUAL; SELECT EXTRACT(HOUR FROM TIMESTAMP '2010-10-10 10:10:10') FROM DU原创 2017-12-28 11:58:09 · 5404 阅读 · 0 评论 -
sql语法小记
1、Oracle 列转行函数 Listagg():示例代码:with temp as( select 'China' nation ,'Guangzhou' city from dual union all select 'China' nation ,'Shanghai' city from dual union all select 'China' nati原创 2018-01-04 09:16:28 · 243 阅读 · 1 评论 -
SQL中inner join、outer join和cross join、union、minus、InterSect区别
1、表ut 表 b 2.left join SELECT * FROM ut left join b on ut.name=b.name order by ut.id3.right joinSELECT * FROM ut right join b on ut.name=b.name order by ut.id;4.full join SELECT *原创 2018-01-05 14:08:27 · 2676 阅读 · 0 评论 -
plsql误操作表的恢复
数据恢复:--允许行移动alter table ut enable row movement;--误操作之前的时间(查询指定时刻的数据)select * from ut as of timestamp to_timestamp('2018-03-14 09:30:00','yyyy-mm-dd hh24:mi:ss');--闪回恢复数据flashback table ut ...原创 2018-03-14 09:53:37 · 1264 阅读 · 0 评论