oracle 数据库普通用户下的基本操作(1)

来源:互联网 发布:淘宝店怎么添加音乐 编辑:程序博客网 时间:2024/06/08 18:46

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);(普通用户下应该不可以进行)

0 0
原创粉丝点击