随笔分类 - Oracle.数据字典
摘要:【查看当前用户的缺省表空间】 SQL:select username,default_tablespace from user_users 运行: luna@ORCL>select username,default_tablespace from user_users; USERNAME DEFAU
阅读全文
摘要:【核心语句】 select dbms_metadata.get_ddl('TABLE',upper('your tablename')) from dual 【实验】 建表: create table emp91( id int, name nvarchar2(20), title varchar2
阅读全文
摘要:1.获得数据库名,创建日期等。 SQL: select name,created,log_mode,open_mode from vdatabase;执行:SQL>selectname,created,logmode,openmodefromvdatabase; NAME CRE
阅读全文
摘要:【Oracle SQL】 一行流方式: select count(*) from all_tables where table_name=upper('your tableName') 层次化方式: select count(*) from all_tables where table_name=u
阅读全文
摘要:【SQL】 select a.table_name as name,b.comments as remark from (select table_name from user_tables ) a inner join (select table_name,comments from user_t
阅读全文
摘要:【sql】 select a.column_name as name,a.column_id as order_num,b.comments as remark from (select column_name,column_id from user_tab_columns where table_
阅读全文
摘要:luna@ORCL>comment on table DEPT is '部门表'; --创建表注释 注释已创建。 luna@ORCL>select * from user_tab_comments where table_name='DEPT'; --读取表注释 TABLE_NAME TABLE_T
阅读全文