SQL Server Interview Questions and Answers

    1 Votes

Top SQL Server interview questions and answers for freshers, 2-5 year experienced programmers and database administrators with examples.

1) What is SQL or Structured Query Language?
SQL is a language which is used to communicate with the database and this language supports operations like insertion, updation, retrieval and deletion.
2) Explain Relational Database Management System (RDBMS)?

RDBMS is database management system which is used to maintain the data records in the tables and also indices in tables. Relationships can be created to maintain the data in the table.

3) Explain the properties of a relational table?
Below are the list of properties relational table should have –
  • Column value of any kind.
  • Insignificant sequence of columns.
  • Insignificant sequence of rows.
  • Unique name for each column.
  • Atomic values.
4) What is ACID mean in Sql Server?
ACID is used for evaluating application and database architecture. Below are the ACID properties –
  • Atomicity
  • Consistency
  • Isolation
  • Durability
5) What are the difference between “Where” and “Having” clause in Sql Server?

“Where” clause is used to filter the rows based on condition. “Having” clause used with SELECT clause and this is used with GROUP BY clause. If GROUP BY clause not used then “HAVING” clause works like a “WHERE” clause.

6) Explain primary key in Sql Server?

This is the combination of fields/columns which are used to uniquely specify a row. Primary Key has a unique constraint defined on the column and the value in the column cannot be NULL.

7) Explain unique key in Sql Server?

Unique Key constraint will enforce the uniqueness of values in the list of columns of the table. No duplicate values are allowed. Unique key will allow NULL in one row unlike Primary Key.

8) Explain foreign key in Sql Server?

Foreign key is used to establish a relationship between the columns of other table. Foreign key relationship to be created between two tables by referencing a column of the table to primary key of another table.

9) What is the use of “JOIN” in Sql Server?

“JOIN” is used to get the data from multiple tables by joining those. Keys created in the tables will play a major role in the “JOIN”.

10) Explain the types of JOINS in Sql Server?

Below are the list of JOINS in Sql Server –

  • Inner Join
  • Right Join
  • Left Join
  • Full Join

11) In which TCP/IP port does Sql Server run?

By default it runs on port – 1433 and it can be changed from “Network Utility TCP/IP” properties.

Page 1 of 6

Popular Videos


How to improve your Interview, Salary Negotiation, Communication & Presentation Skills.

Got a tip or Question?
Let us know

Related Articles

SQL Queries Interview Questions and Answers
Database & SQL Interview Questions
Oracle Interview Questions and Answers on SQL Queries and Database Theory
Advanced SQL Interview Questions and Answers
MongoDB interview questions & answers