20分求购以sql语句,在pl/sql里怎么统计一个表的字段个数?

Soft001 2003-08-19 02:34:59
请用sql语句。不要用高级语言的属性,比如delphi的FieldCount。
...全文
39 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
heyday 2003-08-20
  • 打赏
  • 举报
回复
ALL_TAB_COLUMNS: Columns of all tables, views and clusters
COLS: Synonym for USER_TAB_COLUMNS
Soft001 2003-08-20
  • 打赏
  • 举报
回复
请解释一下表 cols 于 all_tab_columns 的作用与区别。
我看除了 all_tal_columns 多一个字段owner之外,其他的都一样。
xiaohuajx 2003-08-20
  • 打赏
  • 举报
回复
select count(*) from cols where tname='yourtable_name';
Soft001 2003-08-20
  • 打赏
  • 举报
回复
谢了,揭帖,诸位回答的都很好,可惜分太少了,希望不要介意
beckhambobo 2003-08-19
  • 打赏
  • 举报
回复
select count(1) from cols where table_name='yourtable';
xu_guanghui 2003-08-19
  • 打赏
  • 举报
回复
select count(column_name) from dba_cons_columns
where table_name='table_name'
tcmis 2003-08-19
  • 打赏
  • 举报
回复
select COUNT(*) from ALL_TAB_COLUMNS where table_name = 'table_name';
sy_315 2003-08-19
  • 打赏
  • 举报
回复
desc 表名
看表结构
Soft001 2003-08-19
  • 打赏
  • 举报
回复
我急着用,快点啊
wangqiu 2003-08-19
  • 打赏
  • 举报
回复
关注,替你顶!!

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧