Anonymous
Asked in
Cars &Transportation
ยท
2 weeks ago
Can stored procedure insert into table?
Contents
- How do you insert the result of a stored procedure into a table?
- Can you insert with stored procedure?
- Can stored procedure create table?
- Can we join stored procedure with table?
How do you insert the result of a stored procedure into a table?
Once you have the list of columns, it's just a matter of formatting it to suit your needs.1Step 1: Add "into #temp" to the output query (e.g. "select [...] into #temp from [...]"). ... 2Step 2: Run sp_help on the temp table. ( ... 3Step 3: Copy the data columns & types into a create table statement.
Can you insert with stored procedure?
Overview. Generally speaking, in an application variables are used with stored procedures to insert records into a table.
Can stored procedure create table?
For this you would need to use dynamic SQL. Basically dynamic SQL allows you to construct a SQL Statement in the form of a string and then execute it. This is the ONLY way you will be able to create a table in a stored procedure.
Can we join stored procedure with table?
You cannot use CROSS APPLY on a stored procedure, yet a SP can return tables, so why not!?
Related Questions
Relevance
-
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago
Write us your question, the answer will be received in 24 hours