SQL Server interview questions & answers Set 3


What is the STUFF function and how does it differ from the REPLACE function?

STUFF - Delete a specified length of characters and insert another set of characters at a specified starting point.
For example: SELECT STUFF ('asdfghjkl', 3, 5, 'XYZ')
Go
here the result set is:

asXYZkl

REPLACE - Replace all occurrences of the second given string
expression in the first string expression with a third
expression.
For Example: SELECT REPLACE ('Abhay', 'a', 'KKT')
Here the result set is:

KKTbhKKTy

 

What is the purpose of UPDATE STATISTICS?

Updates information about the distribution of key values for one or more statistics groups (collections) in the specified table or indexed view.


What is SQL server agent?

SQL Server Agent is a Microsoft Windows Service that executes scheduled administrative tasks called jobs.

It is made up of 3 components:

1) Jobs - Scheduled tasks

2) Alerts - set of actions occur when an event occurs.

3) Operators -People who alerts are sent to.


0 Response to "SQL Server interview questions & answers Set 3"

Post a Comment