Category Archives: Interview Questions

#SqlServer interview question: What are ranking functions?

Ranking functions return a ranking value for each row in a partition. All the ranking functions are non-deterministic. Each of the ranking functions also needs the OVER( ) clause.

The different ranking functions are as follows: Continue reading #SqlServer interview question: What are ranking functions?

#SqlServer interview question: What is typed XML?

We can create variables, parameters, and columns of the xml datatype – if we associate a collection of XML schemas with a variable, parameter, or column of xml datatype. In this case, the xml datatype instance is called typed XML. Continue reading #SqlServer interview question: What is typed XML?

#SqlServer interview question: What is RAISEERROR?

SQL Server will raise errors when the code you have written cannot or should not execute.

For example, a table should not be created if one with the same name already exists. Suppose you have a stored procedure named UpdateOneRecord which changes one record at a time. Continue reading #SqlServer interview question: What is RAISEERROR?

#SqlServer interview question: What are table-valued parameters?

Table-valued parameters is a feature introduced in SQL Server 2008. In earlier versions of SQL Server it was not possible to pass a table variable into a stored procedure as a parameter.

In SQL SERVER 2008 we can use table-valued parameters to send multiple rows of data to a stored procedure or a function without creating a temporary table or passing in multiple parameters. Continue reading #SqlServer interview question: What are table-valued parameters?

#SqlServer interview question: What is blocking?

SQL Server blocking occurs when one connection places a lock on a table (or selected rows, pages, extent) and another connection attempts to read or modify the data when the lock is in effect. Continue reading #SqlServer interview question: What is blocking?