本文共 1021 字,大约阅读时间需要 3 分钟。
1. 查看oracle的版本信息:
Select version FROM Product_component_version
Where SUBSTR(PRODUCT,1,6)='Oracle';
2. 查看数据库库对象: select owner, object_type, status, count(*) count# from all_objects group by owner, object_type, status; 3. 查看数据库的创建日期和归档方式: Select Created, Log_Mode, Log_Mode From V$Database; 4. 查看当前所有对象: select * from tab; create table b as select * from a where 1=2; create table b(b1,b2,b3) as select a1,a2,a3 from a where 1=2; 6. 查看数据文件放置的路径: select tablespace_name,file_id,bytes/1024/1024,file_name from dba_data_files order by file_id; select concat(列1,列2) from 表1; select to_char(sysdate,'yyyy-mm-dd,hh24:mi:ss') from dual; copy from user1 to user2 create table2 using select * from table1; 10. 视图中不能使用order by,但可用group by代替来达到排序目的 create view a as select b1,b2 from b group by b1,b2;
grant connect,resource to test identified by test;
本文转自 tianya23 51CTO博客,原文链接:http://blog.51cto.com/tianya23/250109,如需转载请自行联系原作者