Skip to content

Instantly share code, notes, and snippets.

@scottlaw1
Created July 11, 2012 11:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Inserting stored procedure results into a table variable
CREATE PROC test_proc
AS
SET NOCOUNT ON
SELECT TOP 10 id, name FROM employee
declare @sometable as table([id] int, name varchar(64))
INSERT INTO @sometable
exec test_proc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment