【Vegas原创】用SQL语句统计一个表有多少列
1.oracle数据库
select count( column_name )
from user_tab_columns
where table_name = '表名'; --表名为大写
2.sqlserver数据库
select count(syscolumns.name)
from syscolumns , sysobjects
where syscolumns.id = sysobjects.id
and sysobjects.name = '表名'
select count( column_name )
from user_tab_columns
where table_name = '表名'; --表名为大写
2.sqlserver数据库
select count(syscolumns.name)
from syscolumns , sysobjects
where syscolumns.id = sysobjects.id
and sysobjects.name = '表名'
喜欢请赞赏一下啦^_^