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 is statistics
What is the difference between commit and rollback?
Can I recover a damaged SQL Server 2008 database with the undamaged .mdb and .ldf files?
What do you mean by cardinality?
How to determine the service pack currently installed on SQL Server?
ow to bring suspect mode datbase online from scratch
An employee table, with the columns id, name, sal and dob. Query to select emp names of all highest salaries(there are 4-5 people having the same salary which happens to be the highest).
Can we execute a stored procedure inside a trigger?
6 Answers BirlaSoft, CarrizalSoft Technologies, United Healthcare,
Do you know how to implement service broker?
What are the advantages of using third-party tools?
What is the joins and how many types of Joins in sql server a diffrentiate ever one give a suaitable query
What is a job?