--1. Create Sample Procedure
CREATE procedure Temp_Proc_Sales_Customer
@@customerID varchar(20)
as
SELECT CustomerID,CompanyName,Phone FROM SalesLT.Customer
WHERE CustomerID = @@customerID
--2. Create Temporary Table
CREATE TABLE Temp_Table_Sales_Customer
( CustomerID VARCHAR(20),
CompanyName VARCHAR(200)
,Phone VARCHAR(20)
)
--3. Do Insert Data From Stored Procedure
INSERT Temp_Table_Sales_Customer (CustomerID,CompanyName,Phone)
EXEC Temp_Proc_Sales_Customer '1'