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 RAID and what are different types of RAID configurations?

RAID stands for Redundant Array of Inexpensive Disks, used to provide fault tolerance to database servers. There are six RAID levels 0 through 5 offering different levels of performance, fault tolerance

What are three SQL keywords used to change or set someone's permissions?

Grant, Deny and Revoke

What is DTC?

The Microsoft Distributed Transaction Coordinator (MS DTC) is a transaction manager that allows client applications to include several different sources of data in one transaction. MS DTC coordinates committing the distributed transaction across all the servers enlisted in the transaction

How to get GUID in sql server?

select newid(). 
This will return you GUID

What is Check Constraint?

Check constraint specifies a condition that is enforced for each row of the table on which the constraint is defined. Once constraint is defined, insert or update to the data within the tables is checked against the defined constraint.


Can we create a Foreign Key with out Primary Key?

Yes. If the table has Unique Key then it is posible to create a Foreign key constraint


Difference between varchar and char:

varchar are variable length strings with a maximum length specified. If a string is less than the maximum length, then it is stored verbatim without any extra characters. 
char are fixed length strings with a set length specified. If a string is less than the set length, then it is padded with extra characters so that it's length is the set length. 

Use varchar when your strings do not have a fixed length (e.g. names, cities, etc.) 

Use char when your strings are always going to be the same length (e.g. phone numbers, zip codes, etc).

[Database Interview Question][Database][Interview Question][SQL Server]