没有什么技术含量,这个月没有怎么写Blog,充个数吧! if object_id('tb') is not null drop table tb create table tb ( ID int identity(1,1) primary key, [Name] varchar(20), Keyword varchar(30) ) insert into tb select 'ws_hgo','hgo' union all select 'guo','guoguo' union all select 'ws','guo' create proc proc_tb ( @TableName varchar(30) ) as declare @s varchar(100) select @s = isnull(@s+',','')+'['+name +']' from syscolumns where id = object_id(@TableName) exec('select '+@s+' from '+@TableName) exec proc_tb 'tb' ID Name Keyword ----------- -------------------- ------------------------------ 1 ws_hgo hgo 2 guo guoguo 3 ws guo