Oracle基本操作

ORACLE下有三个视图

  • DBA_TABLES 拥有DBA角色的用户可以查看系统中的所有表
  • USER_TABLES 登录数据库的当前用户拥有的所有表
  • ALL_TABLES 登录数据库的当前用户有权限查看的所有表

当前用户的表

  • select table_name from user_tables;

所有用户的表

  • select table_name from all_tables;

包括系统表

  • select table_name from dba_tables;

查看用户的所有表名

  • select table_name from all_tables where owner='用户名';(用户名必须是大写)

查看表字段

  • select column_name from user_tab_columns where Table_Name='表名';
posted @ 2020-08-11 17:59  chenzhongming  阅读(173)  评论(1编辑  收藏  举报