取表字段SQL

declare @Col varchar(2000),@TName varchar(128)
set @TName = 'D_Mzgh'
set @Col = @TName + '('
select @Col = @Col + '、' + name
From syscolumns
where id = object_id(@TName)
order by colid

select @Col + ')'

猜你喜欢

转载自www.cnblogs.com/ftian26977863/p/10252853.html