how to give input dynamically to a insert statement in
sqlserver

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is there a performance difference between two similar queries where one uses union and the other uses union all?

508


what stored procedure would you use to view lock information? : Sql server administration

578


Explain what is the difference between union and union all?

545


when you create a database how is it stored? : Sql server database administration

489


What is a synonym for manipulation?

544






What is bit data type?

618


Suggest a method of joining two tables.

598


Explain acid?

604


What is the difference between commit and rollback?

502


What is an expression in ms sql server?

566


What is mssql?

564


Why would you call update statistics?

577


What is filestream?

555


List some advantages and disadvantages of stored procedure?

559


Mention what are the different types of ssrs reports?

98