oracle的一些操作

2022-05-05 07:12:13 字數 411 閱讀 2275

①、dba可以檢視資料庫有多少個使用者

select username from dba_users;

②、dba如何檢視oracle有多少個表空間。

select tablespace_name from dba_tablespaces;

③、檢視乙個表空間有多少張表,而且表空間名字是字串,區分大小寫

select table_name from all_tables where tablespace_name='users';

④、檢視一張表的結構

desc table_name

⑤、設定列寬

字串型別的列寬

col col_name format a50;

數字型別的列寬

col col_name format 99999;

ORACLE 的一些操作

檢視表建立時間 select ao.from all objects ao where object name module and object type table select from user tables select username,count username from v ses...

oracle的一些操作

1.select count from v session select count from v process 檢視當前總會話數和程序數,這兩個檢視就是跟會話及程序有關的重要檢視啦,資訊都是從這裡面取的。2.查詢那些應用的連線數此時是多少 select b.machine,b.program c...

ORACLE 一些操作語句

查詢表的外來鍵 包括名稱,引用表的表名和對應的鍵名,下面是分成多步查詢 select from user constraints c where c.constraint type r and c.table name 要查詢的表 查詢外來鍵約束的列名 select from user cons c...