ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
how to give input dynamically to a insert statement in 
sqlserver
 Question Submitted By :: Y Babu
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how to give input dynamically to a insert statement in sqlserver
Answer
# 1
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 7 No
Senthil Kumar.m
 
  Re: how to give input dynamically to a insert statement in sqlserver
Answer
# 2
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 ?    1 Yes 0 No
Ashutosh Rai
 
 
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
How to write a script for upate the data in prod , i have 50000 row are there TCS2
1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ? Perot-Systems8
In clustered and non clustered indexes which one is faster while executing a query ?  1
what is the purpose of creating view is sql server 2000 Wipro9
Wht is the difference between stored procedure and trigger TCS4
How to list all tables having unique constraints in any of the columns in a database.  1
What is the system function to get the current user's user id? TCS3
UPDATE statement can on a single table or on the multiple table? iGate5
wht is normalization?can u explain me in detail? TCS6
How to count the number of duplicate items in a table?  1
What is bit datatype and what's the information that can be stored inside a bit column?  1
What is Schema? and why we use schemas?  1
logshipping is Any difference 2000 and 2005?  1
How to display n-1 columns from n number of columns, from a single table in MS SQL server 2005?  1
Can you explain the role of each service?  1
Plz tell about backup&recovery?  2
WHAT OPERATOR PERFORMS PATTERN MATCHING? CTS2
Wht is Stuff in sql ser  1
can you any body tell me why are go for the rebuild the master database.what is the reason?  1
what is trigger NIIT1
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com