Interview Question for SQL

interview question for sql

These are some Interview question for SQL given below:-

What’s DBMS?

The Database Management System (DBMS) is a collection of programs that enables its users to access the database, manipulate data, reporting/representation of data.

 What’s RDBMS?

RDBMS stands for the relational database management system. It is a program that allows you to create, update, and administer a relational database. Basically, RDBMS use the SQL language to access the database. It is also known as an electronic database.

Example: SQL Server.

What’s SQL?

SQL stands for Structured Query language.SQL programming is used to search, insert,  update, delete into database records.

What’s a Database?

A database is a systematic collection of record or data. Databases support storage and manipulation of data. In the database, the data are stored in the tabular format. It is also known as electronic data storage.

Example: faculty Management system, Bank Management system.

What’s the super key?

A column or a combination of columns which uniquely identifies a record in a table is called a super key.

What is candidate key?

A minimal super key which uniquely identifies a record in a table is called candidate key, (or) A superkey which is the subset of another super key then those superkeys are not a candidate key.

What’s a join?

The  Joins in SQL is used to combine records from two or more tables in a database.

What is normalization?

Normalization is the process of minimizing redundancy and dependency by organizing the record of a database. The main aim of Normalization is it automatically reduces duplicate data and also automatically avoids insertion, update, deletion problems.

What’s Denormalization?

DeNormalization could be a technique accustomed access the info from higher to lower traditional kinds of information. it’s additionally the method of introducing redundancy into a table by incorporating knowledge from the connected tables.

What is a View?

A view is a virtual table which consists of a subset of data contained in the table in the database. Views take less space to store.

What’s AN Index?

An index is a performance boosting method and that allows allowing faster retrieval of records from the table in the database.

What’s a Cursor?

A Cursor in the database is a control which enables traversal over the records in the table. The cursor is very much useful for traversing such as add, truncate, delete of database records.s.

What’s the connection and what are they?

Database Relationship is defined as the connection between the tables in the database. There are different types of relationship present such as:-

  • One to One Relationship.
  • One to Many Relationship.
  • Many to One Relationship.

What’s a query?

A DataBase query is a code written for communicating with the database of the database.

What is the use of check constraints?

Check constraints are used to define logical condition according to client business rule.
In Oracle, check constraint does not work with sys date function.

What are the different kinds of join present in the database?

Based on equality condition we are retrieving data from multiple tables. Here joining conditional column must belong to the same datatype. Whenever tables having common column then only we are allowed to use equijoin and also these common columns must belong to the same datatype.

Based on other than equality condition (<,>,<=,>=,=,<>) we are retrieving data from
multiple tables.

Joining a table itself is known as self-join. Here joining conditional column must belong to the same datatype.
generally, if we want to compare two column values from different tables and also

Outer join:-

This join operator can be used only one side at a time within joining condition.

What is subquery?

query within another query is known as a subquery.

Types of sub Query:-

1) noncorrelated subquery
2)correlated subquery

 What are the kinds of subquery?

There are 2 forms of subquery – correlative and Non-Correlated.

A correlative subquery cannot be thought of as associate degree freelance question, however, it will refer the column in an exceeding table listed within the FROM the list of the most question.

A Non-Correlated subquery is often thought of as associate degree freelance question and therefore the output of subquery is substituted within the main question.

What’s a trigger?

A sound unit trigger could be a code or programs that mechanically execute with response to some event on a table or read in an exceedingly info. Mainly, trigger helps to take care of the integrity of the info.


Once a brand new student is other to the coed info, new records ought to be created within the connected tables like communicating, Score and attending tables.

What’s the distinction between DELETE and TRUNCATE commands?

Whenever we are using delete from table_name then automatically deleted data internally stored in the buffer. We can also get it back by using rollback .

Whenever we are using truncate table table_name then all rows are permanently deleted
, we can not get it back this data .

What’s a constraint?

constraints are used to prevent invalid data entry into our table.
generally, constraints are created on table columns.
oracle server having the following types of constraints:-







What’s the distinction between Cluster and Non-Cluster Index?

The clustered index is used for easy retrieve the data from the database.
A nonclustered index creates a completely separate object within the table.

What’s Self-Join?

Joining a table itself is known as self-join.
Here joining conditional column must belong to the same datatype.
This can be accustomed to comparing values in an exceeding column with alternative values within the same column within the same table.

What’s Cross-Join?

Cross be a part of defines as a set wherever the number of rows within the 1st table increased by a variety of rows within the second table. I suppose, wherever clause is employed in cross be a part of then the question can work like associate degree INNER be a part of.

What can SQL do?

-> SQL is executed Query against the database.
-> SQL can retrieve data from the database.
-> SQL can insert update delete records from the database.
-> SQL can create objects like table,view,sequence,system,procedure,function,trigger ,package
in database

What is DQL?
-> This is the sub-language of SQL responsible to extract data from the table and display to
the end user.
-> It is otherwise known as DRL(Data Retrieval Language)
-> To do so it provides a statement called select.

What is DDL?
-> It is also the sub-language of SQL responsible to Manipulate the object in Oracle database.
-> It is otherwise known as OML(Object Manipulation Language)
-> Oracle provides the objects to customize the database management i.e table, view
-> To do so SQL provides five statements like
i) create
ii) alter
iv) rename
v) truncate

What is DML?
-> It is used to Manipulate records in Oracle database.
-> It is otherwise known as RML(Record Manipulation Language)
-> To do so it provides three statements like
i) insert
ii) update
iii) delete

What is TCL?
-> Any DML operation is made in Oracle database Transaction never been save until a
save command is the issue.
-> To do so it provides three commands like
i) Commit
ii) Rollback
iii)Save point

What is DCL?
-> To create and manipulate a user in Oracle database DCL provides two commands.
i) grant-giving permission
ii) Debug – Cancel permission

Leave a comment

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