SQL stored procedures interview questions and answers

SQL stored procedures interview questions and answers for freshers and experienced candidates. These interview questions and answers on SQL stored procedures will help you strengthen your technical skills, prepare for the interviews and quickly revise the concepts. Many candidates appear for the interview for one role - many of the them give the right answers to the questions asked. The one who provides the best answer with a perfect presentation is the one who wins the interview race. The set of SQL stored procedures interview questions here ensures that you offer a perfect answer to the interview questions posed to you.
          

SQL Server stored procedures interview questions

 

<<Previous  Next>>

Define Stored Procedures.
Define extended Stored Procedures.
What are the purposes and advantages stored procedure?
Determine when to use stored procedure to complete SQL Server tasks.

Test your SQL Server Skills!

Sql server part 1 (40 questions)  
Sql server part 2 (28 questions)
ASP.NET (41 questions)
Database concepts (20 questions) 

SQL Server stored procedure - August 29, 2008 at 18:00 PM by Nishant Kumar

Define Stored Procedures.

A stored procedure is a compiled set of Transact-SQL statements.
The business logic can be encapsulated using stored procedure.
It improves network traffic by running set of Transact-SQL statements at one go.

Define extended Stored Procedures.

An extended stored procedure compiles as DLL and are created to expand capabilties of user defined stored procedure. It uses xp_ prefix as naming convention.


SQL Server Stored procedure - Nov 20, 2008 at 18:00 PM by Rajmeet Ghai

Define stored procedure.

Answer
Stored procedure is a set of SQL commands that have been complied and stored on the database sever. They can be used in the code as and when required since hey stored. They need not be complied over and over again. They can be invoked by CALL procedure (..) or EXECUTE procedure(..)

What are the purposes and advantages stored procedure?

Answer
Purposes and advantages of stored procedures:

  • Manage, control and validate data
  • It can also be used for access mechanisms
  • Large queries can be avoided
  • Reduces network traffic since they need not be recompiled
  • Even though the stored procedure itself may be a complex piece of code, we need not write it over and over again. Hence stored procedures increases reusability of code
  • Permissions can be granted for stored procedures. Hence, increases security.

Determine when to use stored procedure to complete SQL Server tasks.

Answer

  • If a large piece of code needs to be performed repeatedly, stored procedures are ideal
  • When hundreds of lines of SQL code need to be sent; it is better to use stored procedure through a single statement that executes the code in a procedure, rather than by sending hundreds of lines of code over the network.
  • When security is required.


<<Previous  Next>>

Also read

Describe in brief exporting and importing utility?

Answer - The Bulk Copy is a command utility that transfer SQL data to or from a data file.
This utility mostly used to transfer huge data to SQL server from other database....

Define Distributed Query and Linked Server?

Answer - Distributed Query is a query which can retrieve data from multiple data sources including distributed data........

Define temporary and extended stored procedure.

Answer - Temporary Stored Procedure is stored in TempDB database. It is volatile and is deleted once connection gets terminated or server is restarted......

Define Primary and Unique key.

Answer - The column or columns of the table whose value uniquely identifies each row in the table is called primary key. You can define column as primary key using primary key constraint while you create table.....

What is index? Define its types.

Answer - Index can be thought as index of the book that is used for fast retrieval of information. Index uses one or more column index keys and pointers to the record to locate record.........

 

The answers to following questions will be made available soon. Keep visiting.

Define Stored procedure.
What are the purposes and advantages stored procedure?
Determine when to use stored procedure to complete SQL Server tasks.
Explain the categories of stored procedure i.e. System stored procedure, local stored procedure, temporary stored procedure, extended stored procedure, remote stored procedure.
Explain nested stored procedure. Syntax and an example for create nested stored procedure.
What security features are available for stored procedure?
In what three ways is the RETURN statement used in a stored procedure.



Write your comment - Share Knowledge and Experience

Discussion Board
Sql server

working in sql dba

Nagashekar 08-19-2015 03:26 AM

Stored Procedure in SQL Server

Check out this link...
http://mindstick.com/Articles/79be36ec-d4e6-4ef5-ae5d-c65fd7ede2b9/?Stored%20Procedure%20in%20SQL

Its also having a nice post with wonderful explanation on stored procedure in SQL Server. It might be useful for you.

Somesh Batra 12-23-2011 03:40 AM

 


 



 
Interview questions
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring