Some important SQL about Oracle

--view system time
select sysdate from dual;
--view charset
select userenv('language') from dual;

select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;

select 1+2 from dual;

create sequence aaa increment by 1 start with 1;

select aaa.nextval from dual;
select aaa.currval from dual;

--view table dll
SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name) FROM USER_TABLES u where u.TABLE_NAME='AAATEST';

--view all table include a Column
select table_name from user_TAB_COLUMNS where COLUMN_NAME='DESCRIPTION';

-- select * from USER_TABLES

--oracle query all table and Index include some column
select * from user_TAB_COLUMNS where COLUMN_NAME='DESCRIPTION'

--oracle query all table include some column
select col.table_name from user_TAB_COLUMNS col,USER_TABLES tab where col.COLUMN_NAME='DESCRIPTION' and col.table_name=tab.table_name
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值