Skip to content

Instantly share code, notes, and snippets.

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