Oracle常用查看表结构命令 获取表: select table_name from user_tables; //当前用户的表 select table_name from all_tables; //所有用户的表 select table_name from dba_tables; //包括系统表 select table_name from dba_tables where owner='用户名'
在Oracle中查询锁表及解锁:
锁表查询的代码有以下的形式:
select count(*) from v$locked_object;
select * from v$locked_object;
查看哪个表被锁:
select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where b.object_id = a.object_id;
查看是哪个session
获取表:
select table_name from user_tables; //当前用户的表
select table_name from all_tables; //所有用户的表
select table_name from dba_tables; //包括系统表
select table_name from dba_tables where owner='\u7528\u6237\u540d'
user_tables:
table_name,tablespace_name,last