how to give input dynamically to a insert statement in
sqlserver
Answer Posted / senthil kumar.m
Declare @sql_tmp varchar(100)
set @sql_tmp="insert into table1(col1,col2..)
select 'val1','val2','') "
sp_executesql @sql_tmp
| Is This Answer Correct ? | 0 Yes | 10 No |
Post New Answer View All Answers
Stored Procedure returns data from multiple tables. How to access it in your ASP.Net code?
What is difference between materialized view and view?
Write a query to include a constraint, to check whether the employee salary is greater than 5000?
How to optimize stored procedure optimization?
Where is trigger in sql server?
How you can add messages to the nt event log from within a stored procedure?
What is dbcc? Give few examples.
How to view the error log for any specific instance? : sql server database administration
Does order by actually change the order of the data in the tables or does it just change the output?
What command would you use to create an index?
What is indexed view? How to create it?
What are the joins in sql server? : sql server database administration
What is the function of sql server agent windows service?
What stored by the model?
How to use values from other tables in update statements in ms sql server?