ORACLE中给表、列增加注释以及读取注释
在ORACLE中给表、列增加注释以及读取注释
1、给表填加注释:SQL>comment on table 表名 is '表注释";
2、给列加注释:SQL>comment on column 表.列 is '列注释';
3、读取表注释:SQL>select * from user_tab_comments where comments is not null;
4、读取列注释:SQL>select * from user_col_commnents where comments is not null and table_name='表名';
附表USER_TAB_COMMENTS和user_col_comments的结构:
1、user_tab_comments由table_name、table_type和comments三部分组成。
2、user_col_comments由table_name、column_name和comments三部分组成。
3、在SQL*PLUS中显示表结构:desc 表名;
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/wsw002/archive/2005/11/14/529186.aspx
相关文档:
Oracle函数和mysql函数比较
1. Oracle中的to_number()转换成数字;
Oracle> Select to_number(‘123’) from dual; ----- 123;
&nbs ......
update :单表的更新不用说了,两者一样,主要说说多表的更新
Oracle> Oracle的多表更新要求比较严格,所以有的时候不是很好写,我们可以试试Oracle的游标
&n ......
Oracle笔记
l 关于TRUNC函数
SELECT
RELATED_ID ,
DOC_ID ,
CAT_ID ,
CAT_CODE ,
RELEASE_DATE ,
&n ......
一 在Oracle中连接数据库
public class Test1 {
public static void main(String[] args) {
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection(
&nbs ......
NULL指的是空值,或者非法值。
NVL (expr1, expr2)->expr1为NULL,返回expr2;不为NULL,返回expr1。注意两者的类型要一致
NVL2 (expr1, expr2, expr3) ->expr1不为NULL,返回expr2;为NULL,返回expr3。expr2和expr3类型不同的话,expr3会转换为expr2的类型
NULLIF (expr1, expr2) ->相等返回NULL,不等返回ex ......