how to give input dynamically to a insert statement in
sqlserver
Answers were Sorted based on User's Feedback
Answer / ramadass
Write a store procedure for insert and pass the input value
as parameters to proc.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / ashutosh rai
Declare @id int,@name varchar(100),@class varchar(100)
set @id=1
set @name='Ashutosh'
set @class='MCA'
insert into student_table(id,name,class)
values(@id,@name,@class)
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / 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 |
what's the maximum size of a row? : Sql server database administration
What are user-defined functions (udfs) in sql server?
What is one of the first things you would do to increase performance of a query? For example, a boss tells you that ?a query that ran yesterday took 30 seconds, but today it takes 6 minutes?
2 Answers Accenture, Merrill Lynch, Wipro,
What do you understand by mirroring and mention the advantages of the mirroring?
What are explicit and implicit transactions?
How to find Duplicate Records In table?
Why union all is faster than union?
Can we perform backup restore operation on tempdb? : sql server database administration
Explain system views?
What are sql servers used for?
Does view occupy space?
How can count the string ? for ex: If i have string like 'bhaskar' then i need like b:1 h:1 a:2 s:1 k:1 r:1 please give any idea on that