80+ SQL Interview Questions
❍ Oracle
❍ MySQL
❍ MariaDB
❍ PostgreSQL
❍ SQL Server
⇩
❍ Oracle
❍ MySQL
❍ MariaDB
❍ PostgreSQL
❍ SQL Server
⇩
Level: Beginner to Medium
Topics:
➊ Introduction to RDBMS
➋ Normalisation
➌ Introduction to SQL
➍ Tables and Fields
➎ Constraints
➏ DDL
➐ DML & DQL
➑ Joins
Read all these questions uninterrupted and download them to a PDF using 👇
doc.clickup.com
Topics:
➊ Introduction to RDBMS
➋ Normalisation
➌ Introduction to SQL
➍ Tables and Fields
➎ Constraints
➏ DDL
➐ DML & DQL
➑ Joins
Read all these questions uninterrupted and download them to a PDF using 👇
doc.clickup.com
➊ Introduction to RDBMS
➀ What is a database?
➁ What are the different types of databases?
➂ What is a DBMS?
➃ What is the difference between a database and a DBMS?
➄ What is RDBMS?
➅ Name a few popular RDBMS vendors.
➆ What is the ACID property in a database?
➀ What is a database?
➁ What are the different types of databases?
➂ What is a DBMS?
➃ What is the difference between a database and a DBMS?
➄ What is RDBMS?
➅ Name a few popular RDBMS vendors.
➆ What is the ACID property in a database?
➋ Normalisation
➀ What is normalisation?
➁ Why is normalisation necessary?
➂ What are the disadvantages of not performing normalisation?
➃ What are the different normal forms (NF)?
➄ What is denormalisation?
➀ What is normalisation?
➁ Why is normalisation necessary?
➂ What are the disadvantages of not performing normalisation?
➃ What are the different normal forms (NF)?
➄ What is denormalisation?
➌ Introduction to SQL
➀ What is SQL?
➁ What is the use of SQL?
➂ Is SQL a programming language?
➃ What are the different parts of SQL?
Or,
➄ Group SQL commands into different parts.
➅ What is DDL?
➆ What is DML?
➇ What is DQL?
➈ What is DCL?
➉ What is TCL?
➀ What is SQL?
➁ What is the use of SQL?
➂ Is SQL a programming language?
➃ What are the different parts of SQL?
Or,
➄ Group SQL commands into different parts.
➅ What is DDL?
➆ What is DML?
➇ What is DQL?
➈ What is DCL?
➉ What is TCL?
➍ Tables and Fields
➀ What is a Table?
➁ What is a field in a Table?
➂ Write a SQL command to create a Table.
➃ How do you change the name of a Table?
➄ How to truncate a table?
➅ How to drop a table?
➀ What is a Table?
➁ What is a field in a Table?
➂ Write a SQL command to create a Table.
➃ How do you change the name of a Table?
➄ How to truncate a table?
➅ How to drop a table?
➎ Constraints
➀ What is a constraint?
➁ What are the different levels of constraints?
➂ Give examples of various constraints.
➃ What is a primary key?
➄ What is a unique key?
➀ What is a constraint?
➁ What are the different levels of constraints?
➂ Give examples of various constraints.
➃ What is a primary key?
➄ What is a unique key?
➅ Difference between a primary key and a unique key.
➆ What is a foreign key?
➇ What is NULL value?
➈ What is NOT NULL constraint?
➉ Is blank space or Zero (0) same as NULL?
➆ What is a foreign key?
➇ What is NULL value?
➈ What is NOT NULL constraint?
➉ Is blank space or Zero (0) same as NULL?
➏ DDL
➀ Give some examples of DDL commands.
➁ Write the syntax for creating a table
➂ How to specify the default value for a column?
➃ How to specify a foreign key?
➄ How to specify a unique key?
➅ How to specify multiple columns as the primary key?
➀ Give some examples of DDL commands.
➁ Write the syntax for creating a table
➂ How to specify the default value for a column?
➃ How to specify a foreign key?
➄ How to specify a unique key?
➅ How to specify multiple columns as the primary key?
➆ What different constraints can you add to a column while creating a table?
➇ How to create a copy of a table? (both structure and data).
➈ You have 'n' tables and asked to create a separate table that will contain a few columns from these tables with data being copied.
➇ How to create a copy of a table? (both structure and data).
➈ You have 'n' tables and asked to create a separate table that will contain a few columns from these tables with data being copied.
➉ What is SELECT INTO used for? (In SQL Server)
➀➀ Difference between ALTER and RENAME.
➀➁ Can a previously nullable column be altered to a NOT NULL column? If so, explain the steps.
➀➀ Difference between ALTER and RENAME.
➀➁ Can a previously nullable column be altered to a NOT NULL column? If so, explain the steps.
➐ DML & DQL
➀ How do you insert rows into a table?
➁ What are the different syntaxes for inserting records into a table?
➂ What is the syntax to insert multiple records at a time?
➃ How to update data in a table?
➄ How to delete a row in a table?
➀ How do you insert rows into a table?
➁ What are the different syntaxes for inserting records into a table?
➂ What is the syntax to insert multiple records at a time?
➃ How to update data in a table?
➄ How to delete a row in a table?
➅ Difference between DELETE and TRUNCATE?
➆ Explain how DML operations are performed on a View.
Or,
➇ Are Views used only for SELECT queries?
➈ How to fetch rows from a table?
➉ What is a query condition? How to write it in SQL?
➀➀ How to sort the fetched records?
➆ Explain how DML operations are performed on a View.
Or,
➇ Are Views used only for SELECT queries?
➈ How to fetch rows from a table?
➉ What is a query condition? How to write it in SQL?
➀➀ How to sort the fetched records?
➀➁ What is grouping? How to write in SQL?
➀➂ How to find how many records are being fetched?
➀➃ How to find the maximum and minimum value for a field in fetched records?
➀➄ How to sum values in a field for all records?
➀➂ How to find how many records are being fetched?
➀➃ How to find the maximum and minimum value for a field in fetched records?
➀➄ How to sum values in a field for all records?
➑ Joins
➀ What is a join in SQL?
➁ What are the different types of joins?
➂ What is Inner Join?
➃ What is Left Outer Join?
➄ What is Right Outer Join?
➅ What is Full Outer Join?
➆ What is Cross Join?
➀ What is a join in SQL?
➁ What are the different types of joins?
➂ What is Inner Join?
➃ What is Left Outer Join?
➄ What is Right Outer Join?
➅ What is Full Outer Join?
➆ What is Cross Join?
➇ What is a Self Join?
➈ What is Equi Join?
➉ What is Natural Join?
➀➀ Explain semi-join.
➀➁ Explain anti-join.
➀➂ Given a query in Cross Join, convert it into an Inner Join.
➀➃ Given a query in Right Outer Join, convert it into a Left Outer Join.
➈ What is Equi Join?
➉ What is Natural Join?
➀➀ Explain semi-join.
➀➁ Explain anti-join.
➀➂ Given a query in Cross Join, convert it into an Inner Join.
➀➃ Given a query in Right Outer Join, convert it into a Left Outer Join.
➀➄ Convert an Inner Join into an Equi Join.
Or,
➀➅ What is required to convert an Inner Join into an Equi Join?
➀➆ What should be taken care of to improve the performance of queries containing Joins.
Or,
➀➅ What is required to convert an Inner Join into an Equi Join?
➀➆ What should be taken care of to improve the performance of queries containing Joins.
🚥 Disclaimer
⬘ The questions covered here are mostly conceptual.
⬗ I never claim only these types of questions are/should be asked during interviews.
⬙ For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.
⬘ The questions covered here are mostly conceptual.
⬗ I never claim only these types of questions are/should be asked during interviews.
⬙ For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.
Hey, I am a Tech Writer and Educator from India 🇮🇳
I share tutorials, interview/practice questions, roadmaps, career tips on programming, web dev, database, DSA.
Follow @swapnakpanda for daily threads. RT the below tweet to share it with your audience
I share tutorials, interview/practice questions, roadmaps, career tips on programming, web dev, database, DSA.
Follow @swapnakpanda for daily threads. RT the below tweet to share it with your audience
Loading suggestions...