SQL Interview Questions and Answers

SQL or Structured Query Language is a basic level database language, which all aspirants into privileged software companies must possess knowledge about. Questions related to SQL are asked in interviews of WIPRO, IBM and other large scale multinational software companies. The questions are based on some sectors of the SQL language. So, for the understanding and conceptual knowledge of candidates we list 15 Interview questions which are asked as per general procedure.

SQL interview

SQL Interview Questions and Answers: Frequently Asked Questions And Answers

What is DBMS?

DBMS or Database Management System is a collation of various programs which enables user to update, store, delete and receive informative data.

Note: Similarly a question relating to RDBMS can also be asked.

What is SQL? And what are the different types of SQL?

SQL or Structured Query Language is a language designed to communicate with databases. The different types of SQL are:

DDL: Data Definition Language

DML: Data Manipulation Language

DCL: Data Control Language

What are the Advantages of SQL?

SQL has the following advantages:

  • SQL is supported by almost every DBMS so interaction with any environment is possible.
  • SQL is easy to learn as the commands include simple English.
  • Can be used to perform complex and sophisticated database operations.

What is a Field, Record and Table in a Database?

A field is an array of record stored for specific data operations.

A record is a collection of fields or values of a particular input type.

What is a database transaction? What are the properties of transaction in SQL?

Taking the database from one consistent state to another is known as database transaction. If the transaction is successful the output will be reflected with a state of change.

The properties of transaction are:

Atomicity, Consistency, Isolation and Durability. (Note: learn the definition for each property).

What is database lock? What are its types?

When there is a database lock on a transaction it will show the user if the data item is being used for other transactions. The types of database locks are:

Shared Lock: When a shared lock is applied, other transactions can only read from it but cannot write onto it.

Exclusive Lock: In this case other transactions cannot read or write into a data items.

Which TCP/ IP port does a SQL server run on?

By default the SQL server runs on port 1433. It can be changed using Network Utility properties.

What is the difference between clustered and non-clustered Index?

A clustered index is a special type of index which helps in reordering the way the records in the table are stored.

A non-clustered index is a special type of index in which logical order of the index does not match the sequence of rows on the memory disk.

What are the different Index Configurations?

The different Index Configurations in a Table are:

  • No Index
  • Clustered Index
  • Non-clustered index
  • Combination of one clustered and many non-clustered indexes.
  • Many non-clustered Indexes.

What are the different types of Collation Sensitivity?

The different types of collation sensitivity are:

Case Sensitivity, Accent Sensitivity, Kana Sensitivity and Width Sensitivity.

What is OLTP?

In OLTP, online transaction processing systems using relational database design and modelling are used which follows the Codd rules of data normalization in order to maintain data stability and integrity.

What are the properties and different types of sub-queries?

The properties of sub queries are that they must be enclosed within parenthesis and must be on the right hand side of the comparison operator. Also a sub query does not contain BY-Order clauses. Many sub queries are contained within one query.

The types of sub queries are:

  • Single row return type sub query
  • Multiple row return type sub query
  • Multiple column return type sub query

What is a SQL Profiler?

SQL Profiler is a graphical tool which give the system admin a power to takeover events of SQL servers. We can capture, store and manage data or event in the SQL. SQL profiler not only helps in data analysing, but also makes sure that we can filter data if memory becomes too clustered.

What are authentication modes in a SQL server and how can it be changed?

The authentication modes are Windows Mode and Mixed Mode.

In order to change the authentication mode  we have to follow the following steps: Start->Programs->Microsoft SQL server->SQL Enterprise Manager->Security Options. In this option we can change the authentication mode.

Leave a Reply

Your email address will not be published. Required fields are marked *