oracle 數據庫普通用戶下的基本操作(1)

Oracle Database 11g Express Edition

1、顯示當前用戶名 
  select user from dual;
  show user

2、顯示當前用戶下有那些表

      select * from tab;

3、顯示當所有用戶的表 
  select * from user_tables;

4、顯示當有用戶可以訪問表 
  select * from all_tables;

5、顯示某個用戶名下的表
  select * from dba_tables where owner='用戶名';

6、顯示所有用戶名和帳戶的狀態 
  select username,account_status from dba_users;

7、顯示所有用戶信息 
  select * from dba_users;(一般情況下顯示的是加密的如:select password from dba_users where username='BIT';)

8、將BIT帳號解鎖(加鎖) 
  alter user BIT account unlock(lock);

9、當前用戶的缺省表空間 
  select default_tables from dba_users where username =(select user from dual);(普通用戶下應該不可以進行)

發佈了37 篇原創文章 · 獲贊 20 · 訪問量 13萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章