Insert Into Table with Exec Sproc

Pat Snow 111 Reputation points

How do you insert data into a table variable or temp table by calling a stored procedure?

Azure SQL Database
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
11,581 questions
{count} votes

Accepted answer
  1. Naomi 7,361 Reputation points

    This should work fine:

    insert @Address exec [dbo].[GetAddress] @City = 'Atlanta',@StateProvinceID = 80  SELECT * FROM @Address

0 additional answers

Sort by: Most helpful