SELECT dbms_lob.substr(dbms_metadata.get_ddl('INDEX', INDEX_NAME))||';' from dba_indexes where owner='需要导出所有索引的用户' refer to:https://www.cnblogs.com/lhrbest/p/8820438.html http://www.cnblogs.com/wlzhang/p/5035771.html
◆Oracle查询用户表空间:select * from user_all_tables ◆Oracle查询所有函数和储存过程:select * from user_source ◆Oracle查询所有用户:select * from all_users.select * from dba_users ◆Oracle查看当前用户连接:select * from v$Session ◆Oracle查看当前用户权限:select * from session_privs ◆Oracle查看用户表空间
1.用户 查看当前用户的缺省表空间 SQL>select username,default_tablespace from user_users; 查看当前用户的角色 SQL>select * from user_role_privs; 查看当前用户的系统权限和表级权限 SQL>select * from user_sys_privs; SQL>select * from user_tab_privs; 显示当前会话所具有的权限 SQL>select * from sessi
查看当前用户的缺省表空间 SQL>select username,default_tablespace from user_users; 查看当前用户的角色 SQL>select * from user_role_privs; 查看当前用户的系统权限和表级权限 SQL>select * from user_sys_privs; SQL>select * from user_tab_privs; 查看用户下所有的表 SQL>select * from user_tables;
获取用户表列表: select * from user_tables; select * from all_tables; select * from dba_tables; 获取表的字段: select * from user_tab_columns where Table_Name='用户表'; select * from all_tab_columns where Table_Name='用户表'; select * from dba_tab_columns where Table_Nam