I have a stored procedure with many parameters.
I want to insert (or maybe select) like this:
INSERT INTO @TEMP_TABLE
EXECUTE STORED_PROCEDURE
without defining the schema of @TEMP_TABLE
.
You cannot do this with a @tablevariable
.
The work around in the link posted by Joe uses SELECT ... INTO
.
This is not currently supported by table variables (and won't ever be from the response to this connect item) as the schema for table variables needs to be known at compile time.