您当前的位置: 首页 >  sql

qq_34412985

暂无认证

  • 0浏览

    0关注

    1061博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

oracle常用sql语句

qq_34412985 发布时间:2019-09-04 17:34:50 ,浏览量:0

查询系统时间select to_char(sysdate,'yyyy-mm-dd hh:mm:ss') from dual

查询名称中既有a又有e字符 select * from act_ge_property where name_ like '%a%' and name_ like '%e%'

查询员工的姓名,以及在公司工作的月份数(worked_month),并按月份数降序排列

   select last_name, months_between(sysdate, hire_date) worked_month  from employees order by worked_month desc

查询此用户下所有表:

select * from dba_objects where owner='SYSTEM' and object_type='TABLE' and timestamp>='2019-09-04 00:00:00';

SELECT to_char(SYSDATE,'yyyy-mm-dd hh:mm:ss dd "of" month') FROM dual;双引号添加字符串 SELECT to_char(11111,'L99,999.00') salary FROM dual; 9为数字,L为系统货币,$ SELECT to_number('11,111.00') FROM dual;

 

查询表空间select username,           default_tablespace,           temporary_tablespace from dba_users where username='oratest'; select * from dba_tablespaces;

关注
打赏
1653291990
查看更多评论
立即登录/注册

微信扫码登录

0.0779s