Sql Server Interview Questions and Answers (1758) - Page 49

Which of the following Transact-SQL statement disables the change tracking on this table?

NOTE: This is objective type question, Please click question title for correct answer.
Which data type in SQL Server 2008 represents data in a Euclidean coordinate system?

NOTE: This is objective type question, Please click question title for correct answer.
Which of the following error severity levels can be caught in a TRY... CATCH error handling in SQL Server?

NOTE: This is objective type question, Please click question title for correct answer.
Which of the following new analytic functions introduced in SQL Server 2012 returns the last value in an ordered set of values?

NOTE: This is objective type question, Please click question title for correct answer.
DECLARE @UnitPrice MONEY = 12345.6789 SELECT FORMAT(@UnitPrice, 'C0', 'en-US') what is the output of above statement?

NOTE: This is objective type question, Please click question title for correct answer.
Which of the following function is used to compare current row value with preceding row value?

NOTE: This is objective type question, Please click question title for correct answer.
what is resource db in sql server 2008?

Resource db is hidden and read only database in sql server. It has physical storage of system objects in SQL Server. we can not backup or restore this database by using BACKUP or RESTORE commands in SQL Server
what is the output of SELECT CHOOSE (0, 1, 2, 3)?

NOTE: This is objective type question, Please click question title for correct answer.
what is the output of SELECT CHOOSE (0, 1, 2, 3)?

NOTE: This is objective type question, Please click question title for correct answer.
How many ways to Execute Dynamic Stored Procedures in Sql-Server?

There are the 2 ways to execute dynamic sp in sql-server:-

1). exec(@sql_query).
2). exec sp_executesql @sql_query.

Here,@sql_query is a variable which should be of Nvarchar,Varchar data-type depends on the requirement.

These statement we write inside SP.
Here,sp_executesql is an in-built sql-server function.
What is the output of below query? Select Ascii('A') as uppercase,Ascii('a') as lowercase;

NOTE: This is objective type question, Please click question title for correct answer.
What is the output of below query? Select Quotename('emp_first_name')

NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of below query in SQL-SERVER? Select current_timestamp as 'Current date'; Select getdate() as 'Current date';

Both will produce the same output meaning after executing above query,below output will be displayed.

2013-12-04 15:20:38.833
2013-12-04 15:20:38.833


There is No difference between both in sql-server.
What will be output of below query? Select GetDate(); Select DateAdd(DD,15,GetDate());

Below will be the output:-

2013-12-04 16:40:50.683
2013-12-19 16:40:50.683

As we can see in the output,Time is Same but Date is Different as 04 December and 19 December.

So, DateAdd as the name implies,adds date to the supplied date.
DateAdd is an in-built Sql-Server function.

Here,DD means day which is a datepart.
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories