I have a stored procedure which takes 'table name' as parameter. I want to store my 'exec' results to a variable and display using that variable.
Here is my T-SQL stored procedure..

```
create procedure  DisplayTable( @tab varchar(30))
as
begin
   Declare @Query VARCHAR(30)
   set @Query='select * from ' +@tab
   EXEC (@Query)
END

```

I want to do something like this.. 

```
SET @QueryResult = EXEC (@Query)
select @QueryResult

```

How do i achieve this.. Please help.. I am a beginner..