`
zlotus
  • 浏览: 54183 次
  • 性别: Icon_minigender_2
  • 来自: 北京
社区版块
存档分类
最新评论

oracle Sql-1

    博客分类:
  • Db
阅读更多
1.pl/sql 常用导入导出
export user objects常导出表和存储过程等对象
export tables常导出表结构数据
import tables常导入sql语句用于创建表,结合powerdesigner(generate database)

网络:http://www.cnblogs.com/publicbill/archive/2007/04/24/725688.html
网络:在ORACLE数据库中查询指定用户的表结构
http://blog.hangzhou.com.cn/index.php/469030/viewspace-96169.html


图查询某用户下所有表名及其结构.bmp
select
b.TABLE_NAME as "表名",
c.comments as "表说明",
b.COLUMN_ID as "字段序号",
b.COLUMN_NAME as "字段名",
b.DATA_TYPE as "字段数据类型",
b.DATA_LENGTH  as "数据长度",
b.DATA_PRECISION as "整数位",
b.DATA_SCALE as "小数位",
a.comments as "字段说明"

from

all_col_comments a,
all_tab_columns  b,
all_tab_comments c

where

a.owner='SCOTT' 
and
a.owner  = b.owner
and
a.table_name = b.table_name
and
a.column_name = b.column_name
and
c.table_name= a.table_name
and
c.owner = a.owner
order by
a.table_name,b.column_id



图查询某用户下所有约束.bmp
SELECT T.* FROM  USER_CONS_COLUMNS  T WHERE T.OWNER = 'SCOTT'


字典表:
http://www.iteye.com/topic/82587


  • 大小: 21.9 KB
  • 大小: 6.3 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics