查询表结构:
select * from user_tab_columns where table_name = '大写表名';
查看表结构&字段注释
select
a.column_name,
b.comments,
a.DATA_TYPE || '(' || A .DATA_LENGTH || ')' 类型
from
user_tab_columns a,
user_col_comments b
where
a.table_name = '大写表名'
and a.table_name = b.table_name
and a.column_name = b.column_name
随机查询 N 条数据:
select * from (select * from [表名] order by sys_guid()) where rownum <= N;
递归查询:
select * from [表名] start with [条件] connect by [子级字段] = prior [父级字段];
内容来源于网络如有侵权请私信删除
文章来源: 博客园
- 还没有人评论,欢迎说说您的想法!