【Oracle中查看所有表和字段以及表注释.字段注释】教程文章相关的互联网学习教程文章

Oracle数据库中查看所有表和字段以及表注释.字段注释【代码】【图】

1、获取表: 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=‘用户名‘ALL_OBJECTS describes all objects accessible to the current user. 描述当前用户有访问权限的所有对象 DBA_OBJECTS describes all objects in the database. ...

exp/imp 注释乱码问题或Oracle EXP-00091的解决方法

今天用imp 导入后,发现中注释乱码,源端、目的端数据库版本都是11.2.0.1 查看源端字符集:SQL> select userenv(‘language‘) from dual;USERENV(‘LANGUAGE‘)----------------------------------------------------AMERICAN_AMERICA.AL32UTF8 目标端字符集: SQL> select userenv(‘language‘) from dual;USERENV(‘LANGUAGE‘)----------------------------------------------------AMERICAN_AMERICA.AL32UTF8检查发现源端 NL...

oracle获取表或视图的字段名、数据类型、注释

select t1.COLUMN_NAME 字段名,t1.DATA_TYPE 数据类型,t2.comments 注释 from (select t.COLUMN_NAME,t.DATA_TYPE from user_tab_columns t where t.TABLE_NAME=upper(‘vw_personbaseprint_data‘)) t1,(select tt.column_name,tt.comments from user_col_comments tt where tt.table_name=upper(‘vw_personbaseprint_data‘)) t2 where t1.COLUMN_NAME=t2.column_name本文出自 “11075795” 博客,谢绝转载!原文:http://11085...

oracle sql 妙用+表注释【代码】

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=‘用户名‘ user_tables: table_name,tablespace_name,last_analyzed等 dba_tables: ower,table_name,tablespace_name,last_analyzed等 all_tables: ower,table_name,tablespace_name,last_analyzed等 ...

ORACLE数据库导出表,字段名,长度,类型,字段注释,表注释语句

--数据库导出表,字段名,长度,类型,字段注释,表注释语句 SELECT T1.TABLE_NAME 英文表名, T1.COLUMN_NAME 字段名, T1.DATA_TYPE || ‘(‘ || T1.DATA_LENGTH || ‘)‘ 字段类型及长度, T2.COMMENTS 字段注释, t3.COMMENTS 表注释 FROM USER_TAB_COLS T1, USER_COL_COMMENTS T2,user_tab_comments t3 WHERE T1.TABLE_NAME = T2.TABLE_NAME AND T1.COLUMN_NAME = T2.COLUMN_NAME and t3.TABLE_NAME = t1.TABLE_NAME and ...

oracle 使用comment语句添加表注释

大致语法为: comment on TABLE table_name IS ‘备注内容‘;权限要求: 默认情况下用户只能给属于自己的对象添加注释。 如果要想给其他用户对象添加注释需要拥有权限:COMMENT ANY TABLE相关数据字段视图: USER_TAB_COMMENTS DBA_TAB_COMMENTS ALL_TAB_COMMENTS USER_COL_COMMENTS DBA_COL_COMMENTS ALL_COL_COMMENTS示例如下: drop table t; create table t(id number);select * from user_tab_comments;TABLE_NAME ...

Oracle批量加注释,并生成html

效果如下:comment on column table1.Id is q‘{PK}‘;comment on column table1.col1 is q‘{Counterparty Organization ID}‘;comment on column table1.col2 is q‘{Agreement Description}‘;--生成html格式 SET MARKUP HTML ON SPOOL ON pre off entmap offSET ECHO OFFSET TERMOUT OFFSET TRIMOUT OFFset feedback offset heading onset linesize 200set pagesize 10000set timing offcol nullable for a8spool t1.htmlselec...

读取oracle注释【代码】

# coding=utf-8 __author__ = ‘jspdba‘ u‘‘‘ 读取oracle注释 ‘‘‘ import cx_Oracle # 导入模块SQL=r""" select * from user_col_comments t where 1=1 and t.comments is not null and t.table_name = ‘@TABLE‘ """ words=["custom","code","trans","mode","date","confirm","balance","amount","after", "type","area","game","flow","is","big","win","status","flag","num","client", "reward","id"...

oracle sql 妙用+表注释【代码】

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=‘用户名‘ user_tables: table_name,tablespace_name,last_analyzed等 dba_tables: ower,table_name,tablespace_name,last_analyzed等 all_tables: ower,table_name,tablespace_name,last_analyzed等 ...

CodeSmith无法获取Oracle表注释【代码】

获得表的注释,Oracle专用 public string GetTableDescription(){string result="";using (OracleConnection conn = new OracleConnection(this.SourceTable.Database.ConnectionString)){OracleCommand comm = new OracleCommand("select Comments from user_tab_comments where table_name=‘"+this.SourceTable.Name+"‘", conn); conn.Open();result =Convert.ToString(comm.ExecuteScalar());comm.Dispose();conn.Clos...

Oracle 增加修改删除字段与添加注释

添加字段的语法:alter table tablename add (column datatype [default value][null/not null],….); 修改字段的语法:alter table tablename modify (column datatype [default value][null/not null],….); 删除字段的语法:alter table tablename drop (column); 添加、修改、删除多列的话,用逗号隔开。 使用alter table 来增加、删除和修改一个列的例子。 创建表结构:create table test1(id varchar2(20) not null); ...

Oracle、Mysql、SqlServer创建表和给表和字段加注释【代码】

--创建表 create table test ( id varchar2(200) primary key not null,sort number, name varchar(200) ) --字段加注释 comment on column test.id is ‘id‘; comment on column test.sort is ‘序号‘; --表加注释 comment on table test is ‘测试表‘ 二.Mysql--创建表 create table test ( id varchar(200) not null,sort int(11) comment ‘排序‘,name varchar(200) comment ‘名称‘, ) --表加注释 alter table tes...

Oracle根据Excel或者world数据字典自动生成建表语句和注释【代码】

table t_OUTString ( Tname varchar2(50), OUTString clob, OUTSTRING2 clob, createddate date ); create or replace procedure Pro_ExToSql(SStrin in varchar2 ,TString in varchar2) isRString varchar2(30000);RowString varchar2(30000);LeaveString varchar2(30000);midStr varchar2(30000);LeftStr varchar2(30000);RightStr varchar2(30000);V_Cname varchar2(100);V_Cty...

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=‘用户名‘user_tables: table_name,tablespace_name,last_analyzed等 dba_tables: ower,table_name,tablespace_name,last_analyzed等 all_tables: ower,table_name,tablespace_name,last_analyzed等 all_ob...

Power Designer逆向工程导入Oracle表,转为模型加注释

= True InteractiveMode = im_BatchDim mdl ‘the current model‘get the current active model Set mdl = ActiveModel If (mdl Is Nothing) Then MsgBox "There is no current Model" ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then MsgBox "The current model is not an Physical Data model." Else ProcessFolder mdl End If‘This routine copy name into code for each table, each column and each view ‘of the current ...