.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
hdjk11
Shivakumaran
dfefde5
hoangnganvy1993


Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.


Post New Question Subscribe to Interview Questions
 
Quick Links For Interview Questions Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  OOPs  JQuery  JavaScript/VBScript
BiztalkPatten/PracticesIISWCFWPFWWF
NetworkingAptitudeOthers  All    
 

Sql Server Interview Questions and Answers

Difference between Unique Key and Primary Key

Author: abhays          Posted Date: January 15, 2013    Category: Sql Server     Points: 40

1. A UNIQUE constraint is similar to PRIMARY key, but you can have more than one UNIQUE constraint per table.
2. Primary Key does not allow null values whereas unique constraint allows 'single' null value.
3. A table can have only single Primary Key where as it can have multiple unique constraints ( max 16)
4. Primary Key creates clustered index by default whereas Unique Key creates non-clustered index by default

Difference between:UNION and INTERSET?

Author: Narayanan          Posted Date: August 13, 2012    Category: Sql Server     Points: 40

UNION: OR operator (value is selected if it appears in either the first or the second statement)
INTERSET:AND operator (value is selected only if it appears in both statements).

Difference between UNION and UNION in SQL ?

Author: Narayanan          Posted Date: August 13, 2012    Category: Sql Server     Points: 40

UNION : Doesn't return Duplicate Values.
UNION ALL: return All values (includes Duplicate Values)

Difference between Top and LIMIT?

Author: Narayanan          Posted Date: August 13, 2012    Category: Sql Server     Points: 40

Top: Retrieve Top records from the Table,
LIMIT: Retrieve LIMIT records from the Table.

what is mean by constraint?

Author: Narayanan          Posted Date: August 09, 2012    Category: Sql Server     Points: 40

constraint:
protect columns of the table from unwanted values.
NOT NULL, CHECK, UNIQUE, PRIMARY KEY, FOREIGN KEY are the types of contraints define in SQL Server.

Difference between Primary and Unique key.

Author: Narayanan          Posted Date: August 09, 2012    Category: Sql Server     Points: 40

Primary Key:
A column defined as primary key doesn’t allow null value.
By default, clustered index in created with the column having primary key.
Unique Key:
A column with unique key defined allows null value.
By default, it creates non-clustered index.

What is the Use of ISNull function in SQL Server?

Author: Narayanan          Posted Date: July 30, 2012    Category: Sql Server     Points: 40

Find the not null value in the list of value.

how to get Indian time in U.S Server?

Author: Deco          Posted Date: January 17, 2012    Category: Sql Server     Points: 40

You can use the below Query to get the Indian Time

SELECT DATEADD(Minute, 30, DATEADD(Hour, 5, GETUTCDATE())) AS [Indian Time]

what are the Types of constraints?

Author: Narayanan          Posted Date: January 13, 2012    Category: Sql Server     Points: 40

The following are the Types of constraints
NOT NULL, CHECK, UNIQUE, PRIMARY KEY, FOREIGN KEY

How do you display only few # of rows from any table?

Author: Narayanan          Posted Date: October 31, 2011    Category: Sql Server     Points: 40

Top Clause



Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend