请问怎么取出表中的不定前几行?select top n from table n能不能用变量控制呢?[解决办法] declare @i int set @i=3 exec(select top '+rtrim(@i)+ ' * from t)