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 |
Write an sql query to sort a table according to the amounts in a row and find the second largest amount.
How to delete existing rows in a table?
whats new about truncate in sql server 2008?
0 Answers MedSave Healthcare, Serco,
What is “begin trans”, “commit tran”, “rollback tran” and “savetran”?
What is the difference between for auto and for nested?
Write down the syntax and an example for create, rename and delete index?
How to get a list of all tables with "sys.tables" view in ms sql server?
What are three SQL keywords used to change or set someone?s permissions?
What are the different ways you can create databases in sql server?
List all types of constraints in sql server?
How do I debug a stored procedure in sql server?
sql server has its default date format in da form "yy-mm-dd" its possible to convert da current date format of sql server to desired format. Now my question is dat how to get da previous and comin days date in my desired format??
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)