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 the default Port No on which SQL Server listens?
Is it possible to have more then one foreign key in a single table? if possible, is this the good way to design the table?
my name is sejal I have cleared the sbi clerk exam. I am BCA graduate My favorite subject RDBMS Relational database management system. so please send me rRDBMS related interview questions
How to check if a table is being used in sql server?
If a stored procedure is taking a table data type, how it looks?
can any body tell me how to know the password of current user in sql server
What will be the maximum number of index per table?
What is cursors? And what are the different types of cursor?
What do you mean by tablesample?
How to change the name of a database user?
What do you mean by data integrity?
Can a table have 2 foreign keys?