加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

oracle数据库使用学习

发布时间:2020-12-12 16:03:21 所属栏目:百科 来源:网络整理
导读:1.查询时间字段问题: 用sql语句查询的时候,需要将字符串转换,to_timestamp或者to_date where insert_timeto_timestamp('2013-08-01 00:00:00','yyyy-mm-dd hh24:mi:ss') 2.树操作(select…start with…connect by…prior) http://www.cnblogs.com/linjiqin

1.查询时间字段问题:

用sql语句查询的时候,需要将字符串转换,to_timestamp或者to_date

where insert_time>to_timestamp('2013-08-01 00:00:00','yyyy-mm-dd hh24:mi:ss')

2.树操作(select…start with…connect by…prior)

http://www.cnblogs.com/linjiqin/archive/2013/06/24/3152674.html

connect by prior m.parent=m.id; 是查询所有的父节点

connect by m.parent=prior m.id; 是查询所有的子节点

level,connect_by_root,connect_by_isleaf,sys_connect_by_path,lpad(' ',(level-1)*2,' ')补空格

3.in()中的对象不能超过1000个,超过了就只能自己拆分

where a in(...) or a in(...)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读