SQL Server Functions Interview Preparation Guide

SQL Server Functions frequently Asked Questions by expert members with experience in MS SQL Server Functions. These interview questions and answers on SQL Server Functions will help you strengthen your technical skills, prepare for the interviews and quickly revise the concepts. So get preparation for the SQL Server Functions job interview
Tweet Share WhatsApp

12 MS SQL Server Functions Questions and Answers:

1 :: MS SQL Server Functions Job Interview Questions!

Explain Microsoft SQL Server functions?
What are the benefits of User-Defined Functions?
Explain the difference between Functions and Stored procedures in SQL Server?
Download MS SQL Server Functions PDF Read All 12 MS SQL Server Functions Questions

2 :: Explain the benefits of User-Defined Functions?

a. Can be used in a number of places without restrictions as compared to stored procedures.

b. Code can be made less complex and easier to write.

c. Parameters can be passed to the function.

d. They can be used to create joins and also be sued in a select, where or case statement.

e. Simpler to invoke.

3 :: What is user-defined function? Explain its types i.e. scalar and Inline table value user-defined function?

User defined functions are created and defined by the user. They are created as per users needs. They may or may not accept parameters. They can be used to create joins and simple to invoke as compared to stored procedures

Types:
Scalar user defined: returns values as one of the scalar data types. Text, timestamp, image data types are not supported. It may or may not accept parameters.

Inline table value user defined : it returns a table data type. These functions can pass parameters to the sql’s SELECT command. They are similar to views except, they can accept parameters.

4 :: What is built-in function?

A built in function of sql is used for performing calculations. These are standard functions provided by sql.

5 :: What are aggregate functions?

Aggregate functions: these functions perform calculation on a column and return a single value. Example: AVG(), SUM(), MIN(), MAX()
Download MS SQL Server Functions PDF Read All 12 MS SQL Server Functions Questions

6 :: What are scalar functions?

Scalar functions : these functions perform calculation on an input value and return a single value. Example: ROUND(), MID(), LCASE(), UCASE()

7 :: Explain database Normalization?

It is the process of organizing data into related table.
To normalize database, we divide database into tables and establish relationships between the tables.
It reduces redundancy. It is done to improve performance of query.

8 :: Explain Steps of normalization?

First Normal form
Entities of the table must have unique identifier or entity key.
Second Normal Form
All the attributes of the table must depend on the entity key for that entity.
Third Normal Form
All attributes that are not part of the key must not depend on any other non-key attributes.

9 :: What is De-normalization?

The process of adding redundant data to get rid of complex join, in order to optimize database performance. This is done to speed up database access by moving from higher to lower form of normalization.

10 :: What do you know about Normalization and De- Normalization?

Normalization is the process of reducing data redundancy and maintains data integrity. This is performed by creating relationships among tables through primary and foreign keys. Normalization procedure includes 1NF, 2NF, 3NF, BCNF, and then the data is normalized.

Denomalization on the contrary is the process of adding redundant data to speed up complex queries involving multiple table JOINS. One might just go to a lower form of Normalization to achieve Denormalization and better performance. Data is included in one table from another in order to eliminate the second table which reduces the number of JOINS in a query and thus achieves performance.
Download MS SQL Server Functions PDF Read All 12 MS SQL Server Functions Questions