Home > Database > Mysql Tutorial > SqlServer查询表中各列名称、表中列数

SqlServer查询表中各列名称、表中列数

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 14:53:23
Original
1352 people have browsed it

查询表名为tb_menu的所有列名 ? 1 select name from syscolumns where id=object_id('tb_menu') 查询表名为tb_menu的所有列名个数 ? 1 select count(name) from syscolumns where id=object_id('tb_menu') 或者 ? 1 2 3 select count(syscolumns.name) fro

  查询表名为tb_menu的所有列名
?

1

select name from syscolumns where id=object_id('tb_menu')

  查询表名为tb_menu的所有列名个数

?

1

select count(name) from syscolumns where id=object_id('tb_menu')

  或者

?

1

2

3

select count(syscolumns.name)

from   syscolumns ,sysobjects   

where  syscolumns.id=sysobjects.id  and sysobjects.name = 'tb_menu'

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Problem with tp6 connecting to sqlserver database
From 1970-01-01 08:00:00
0
0
0
Unable to connect to SQL Server in Laravel
From 1970-01-01 08:00:00
0
0
0
Methods of parsing MYD, MYI, and FRM files
From 1970-01-01 08:00:00
0
0
0
SQLSTATE: User login failed
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template