DECLARE @COLUMN nvarchar (MAX)
SET @COLUMN = '' SELECT
@COLUMN += name + ','
FROM
syscolumns
WHERE
id = Object_Id('hr_slr_fix') --表名
AND name NOT IN (
'rid'
) SELECT
@COLUMN 'field'
sqlserver 查询数据库中表的字段
最新推荐文章于 2022-05-05 12:38:43 发布