oracle中ALL_TABLES、DBA_TABLES、USER_TABLES系统表

  • DBA_TABLES 显示的是数据库中所有表(所有表DBA都可以操作)
  • ALL_TABLES 显示与当前用户可访问的表 (只要对某个表有任何权限,即可在此视图中看到表的相关信息)
  • USER_TABLES 显示当前用户拥有的表

所以以上3个视图中,user_tables的范围最小,all_tables看到的东西稍多一些,而dba_tables看到最多的信息

/********************************************
     通过系统表,查看表中列的属性,包括 数据类型,是否非空,
********************************************/ --
SELECT
	A.table_name AS "表名",
	A.COLUMN_ID AS "列序号",
	A.column_name AS "列名",
	A.data_type AS "类型",
	A.data_length AS "长度",
	A.DATA_PRECISION AS "数据精度",
	A.NULLABLE AS "是否为空",
	B.comments AS "注释" 
FROM
	user_tab_columns A LEFT JOIN user_col_comments B ON B.table_name = A.table_name 
	AND A.column_name = B.column_name 
ORDER BY
	A.table_name,
	A.COLUMN_ID;

/********************************************
    查看ORACLE 数据库中所有表的注释
********************************************/--
SELECT
	table_name,
	comments 
FROM
	user_tab_comments;
/********************************************
查看ORACLE 数据库中所有列的注释
********************************************/--
SELECT
	table_name,
	column_name,
	comments 
FROM
user_col_comments;
  • 1
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
真的Oracle 10g的官方速成培训教材 英语原版教材(英文较简单) 主要内容 Chapter 1, "Introduction" This chapter contains an brief overview of Oracle database administration. Chapter 2, "Installing Oracle and Building the Database" This chapter discusses how to install the Oracle software and database. It also describes how to configure additional databases, and how to upgrade and older version of a database to the current version. Chapter 3, "Getting Started with Oracle Enterprise Manager" This chapter introduces you to the Oracle Enterprise Manager and how to use it. Chapter 4, "Configuring the Network Environment" This chapter discusses how to configure a network so that clients can access your databases. Chapter 5, "Managing the Oracle Instance" This chapter discusses starting and stopping the database instance, and managing initialization parameters. Chapter 6, "Managing Database Storage Structures" This chapter discusses management of the database’s storage structure. Chapter 7, "Administering Users and Security" This chapter discusses how to add and maintain user accounts. It includes information about using system privileges and roles to control user access to the database. Chapter 8, "Managing Schema Objects" This chapter discusses managing tables, indexes, and other schema objects. Chapter 9, "Performing Backup and Recovery" This chapter discusses how to backup and recover your database. Chapter 10, "Monitoring and Tuning the Database" This chapter discusses monitoring database activities and diagnosing performance problems.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值