How can I create a table variable (virtual in-memory table) with columns that match the stored procedure resultset? I tried to execute the procedure using column names I specified. Does the data type of the columns need to be the same as the stored procedure? Here is what I tried:
DECLARE @Table TABLE(
name varchar(30) NOT NULL,
location varchar(30) NOT NULL
SELECT name, location FROM
Exec SPROC @param , @param
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!