Sql Interview Question and Answers

46. What command do we use to rename a db?
  sp_renamedb “oldname” , “newname”
If someone is using db it will not accept sp_renmaedb. In that case first bring db to single user using sp_dboptions. Use sp_renamedb to rename database. Use sp_dboptions to bring database to multi user mode.
 
Your Name Your Email-ID
Your Answer
47. What is BCP?
  BulkCopy is a tool used to copy huge amount of data from tables and views. BCP does not copy the structures same as source to destination.
 
Your Name Your Email-ID
Your Answer

48. What is Cross Join?
  A cross join that does not have a WHERE clause produces the Cartesian product of the tables involved in the join. The size of a Cartesian product result set is the number of rows in the first table multiplied by the number of rows in the second table.
 
Your Name Your Email-ID
Your Answer
49. What is Storage Manager?
  It is a program module that provides the interface between the low-level data stored in database, application programs and queries submitted to the system.
 
Your Name Your Email-ID
Your Answer
50. What are stored-procedures? And what are the advantages of using them?
  Stored procedures are database objects that perform a user defined operation. A stored procedure can have a set of compound SQL statements. A stored procedure executes the SQL commands and returns the result to the client. Stored procedures are used to reduce network traffic.
 
Your Name Your Email-ID
Your Answer