日期:2014-05-18 浏览次数:20541 次
declare @tt text set @tt=[成绩] select * from @tt
create table [成绩](sid int,cid int,scroe int) insert into [成绩] select 1,1,60 insert into [成绩] select 2,1,75 insert into [成绩] select 3,1,84 go declare @tt nvarchar(1000) set @tt='[成绩]' exec('select * from '+ @tt) /* sid cid scroe ----------- ----------- ----------- 1 1 60 2 1 75 3 1 84 (3 行受影响) */ go drop table [成绩]