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
Which operator do you use to return all of the rows from one query except rows are returned in a second query?
What are the new features introduced in SQL Server 2000? What changed between the previous version of SQL Server and the current version?
What are the restrictions while creating batches in sql server?
What is the user of Primary key?
Disadvantages of the indexes?
as a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this? : Sql server administration
What is statement level trigger?
What different steps will a sql server developer take to secure sql server?
Suppose you want to implement the many-to-many relationships while designing tables. How would you do it?
What is compression - row-level and page-level compression?
Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?
What happens when converting big values to integers?
Name and describe few console utilities for ssrs?
What is ssrs?
What is the importance of a recovery model?