SQL and DBMS Interview Questions
April 6, 2024 2024-04-06 10:57SQL and DBMS Interview Questions
SQL & DBMS Most Important Interview Question for Placement
What is SQL?
SQL is a computer language that is used for storing, manipulating, and retrieving data in a structured format. This language was invented by IBM. Here SQL stands for Structured Query Language. Interacting databases with SQL queries, we can handle a large amount of data.
There are several SQL-supported database servers such as MySQL, PostgreSQL, sqlite3 and so on. Data can be stored in a secured and structured format through these database servers. SQL queries are often used for data manipulation and business insights better.
This guide will help you to brush up on your SQL skills, regain your confidence and be job-ready!😀
Interview Questions (SQL & DBMS)
- SQL query to find second highest salary?
- Write an SQL query to fetch duplicate records from EmployeeDetails. SELECT OrderID, COUNT(OrderID) FROM Orders GROUP BY OrderID HAVING COUNT(OrderID) > 1
- SQL Query to fetch records that are present in one table but not in another table.
- Write an SQL query to find the employee id whose salary lies in the range of 9000 and 15000. (Any range)
- Write an SQL query to fetch common records between two tables.
- Write an SQL query to find the current date-time.
- Write a query to fetch the Empname from the EmployeeInfo table in the upper case and use the ALIAS name as EmpName.
- Write a query to find the names of employees that begin with ‘S’ (or anything)
- Joins in SQL ( All types with syntax and basic examples for Inner, Outer Left, Outer Right, Self Join , Cross Join , Full Join)
- What is SQL Injection.
- What are ACID properties?
- Why do we use Commit and Rollback command?
- Difference between Delete , Drop and Truncate Statement?
- What are UNION, MINUS and INTERSECT commands?
- What is an ALIAS command?
- What is a Constraint?
- What are Local and Global Variables and their differences?
- What is a Query?
- Write down various types of relationships in SQL?
- What is Normalization? Explain all the types.
- What is Table and Field?
- Explain all kind of keys in SQL. ( Primary key, Unique Key , Foreign Key , Alternate Key , Composite Key, Super Key )
- What is the Difference between Primary key and Unique Key or Primary key and Foreign Key?
- Explain the difference between a 2-tier and 3-tier architecture in a DBMS.
- What is SQL?
- What is DBMS and RDBMS difference between Them?
- Difference between SQL and MySQL.
- What are Tables and Fields?
- What is Data Integrity?
- What is a Query?
- Explain Select , Where , Order by , Group by Statement.
- What are Entities and Relationships?
- What is views in SQL.
- What are Aggregate and Scalar functions?
- What is Limits in SQL and Syntax of Limit.
- Explain DDL ,DML, DCL TCL with the help of example.
- What is a Stored Procedure in SQL?
Where to Start? 🤔
With so many online sites and resources it’s very natural that one will be confused. So, to make things easier I will provide you some resources here.