Created
July 11, 2012 11:55
-
-
Save scottlaw1/3089921 to your computer and use it in GitHub Desktop.
Inserting stored procedure results into a table variable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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