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);(普通用戶下應該不可以進行)