今天发现解决这个问题其实很简单,闲话不多谈,我直接附上语句
declare @s varchar(1000) select @s = isnull(@s+',', '') + [name] from syscolumns where id = object_id('表名') select @s='insert into ( '+@s+ ')'+'values (值)' select @s
今天发现解决这个问题其实很简单,闲话不多谈,我直接附上语句
declare @s varchar(1000) select @s = isnull(@s+',', '') + [name] from syscolumns where id = object_id('表名') select @s='insert into ( '+@s+ ')'+'values (值)' select @s