50+ SQL Interview Questions
❍ Oracle
❍ MySQL
❍ MariaDB
❍ PostgreSQL
❍ SQL Server
⇩
❍ Oracle
❍ MySQL
❍ MariaDB
❍ PostgreSQL
❍ SQL Server
⇩
Level: Beginner to Medium
Topics:
➊ Data Types
➋ Operators
➌ Built-In Functions
➍ Aggregations
➎ Views
✧ Read all these questions uninterrupted and download them to a PDF using 👇
doc.clickup.com
Topics:
➊ Data Types
➋ Operators
➌ Built-In Functions
➍ Aggregations
➎ Views
✧ Read all these questions uninterrupted and download them to a PDF using 👇
doc.clickup.com
➊ Data Types
➀ When do you define the data type of a column?
➁ Can a data type be changed later? What are the restrictions?
➂ What are the different numeric data types?
➃ What data type is used to store a boolean?
➄ What data type is used to store bits?
➀ When do you define the data type of a column?
➁ Can a data type be changed later? What are the restrictions?
➂ What are the different numeric data types?
➃ What data type is used to store a boolean?
➄ What data type is used to store bits?
➅ What data type is used for integers?
➆ What data type is used for floating point numbers?
➇ What are the different string data types?
➈ What data type is used to store binary data?
➉ What is the difference between CHAR, VARCHAR, and VARCHAR2 (Oracle)?
➆ What data type is used for floating point numbers?
➇ What are the different string data types?
➈ What data type is used to store binary data?
➉ What is the difference between CHAR, VARCHAR, and VARCHAR2 (Oracle)?
➀➀ What is a Large Object Data Type?
➀➁ What are different large object data types?
➀➂ What is the difference between BLOB and CLOB?
➀➃ When should you go for a large object data type instead of a string data type?
➀➄ What are different date and time data types?
➀➁ What are different large object data types?
➀➂ What is the difference between BLOB and CLOB?
➀➃ When should you go for a large object data type instead of a string data type?
➀➄ What are different date and time data types?
➋ Operators
➀ What operator is to verify if all subqueries meet the condition?
➁ What operator is to verify if any of the subqueries meet the condition?
➂ What operator is to check if an operand is within a range?
➀ What operator is to verify if all subqueries meet the condition?
➁ What operator is to verify if any of the subqueries meet the condition?
➂ What operator is to check if an operand is within a range?
➃ What operator is to check if the operand should be one of the given values?
➄ What operator is to check if a subquery returns at least one record?
➅ What operator is to check if the operand matches a pattern?
➆ What is the difference between BETWEEN and IN operators?
➄ What operator is to check if a subquery returns at least one record?
➅ What operator is to check if the operand matches a pattern?
➆ What is the difference between BETWEEN and IN operators?
➇ What is the difference between the = and LIKE?
➈ How to check if a field contains a NULL value?
➉ What are the different comparison operators?
➀➀ What is the operator to check for inequality?
➈ How to check if a field contains a NULL value?
➉ What are the different comparison operators?
➀➀ What is the operator to check for inequality?
➌ Built-In Functions
➀ What is a SQL function?
➁ What function will return the current system date and time?
➂ What function will find the length of a text field?
➃ What function will convert a text field to upper/lower case?
➄ How to get a substring?
➀ What is a SQL function?
➁ What function will return the current system date and time?
➂ What function will find the length of a text field?
➃ What function will convert a text field to upper/lower case?
➄ How to get a substring?
➅ What are the different format options for displaying a text field?
➆ How to round a numeric field to a certain precision?
➇ Give examples of some date and time functions.
➈ How to get the year/month/date from a date field?
➉ How to get the last day of the month?
➆ How to round a numeric field to a certain precision?
➇ Give examples of some date and time functions.
➈ How to get the year/month/date from a date field?
➉ How to get the last day of the month?
➍ Aggregations
➀ What do you mean by aggregation?
➁ What is the difference between aggregation and projection?
➂ What does the "GROUP BY" statement do?
➃ What is the difference between WHERE and HAVING?
➄ Is "ORDER BY" an aggregation statement?
➀ What do you mean by aggregation?
➁ What is the difference between aggregation and projection?
➂ What does the "GROUP BY" statement do?
➃ What is the difference between WHERE and HAVING?
➄ Is "ORDER BY" an aggregation statement?
➅ What function will find the number of records in the query result?
➆ What function will fetch the first or last value for a field?
➇ What functions will fetch the max, min, and average values of a field?
➈ What function will find the summation of all values for a field?
➆ What function will fetch the first or last value for a field?
➇ What functions will fetch the max, min, and average values of a field?
➈ What function will find the summation of all values for a field?
➎ Views
➀ What is a View?
➁ How is a View different from a Table?
➂ What are the use cases of a View?
➃ Can a View be used to insert/delete records?
➄ How to create/update a View?
➅ What is "WITH CHECK OPTIONS"?
➆ What is a Materialised View? Difference from a View
➀ What is a View?
➁ How is a View different from a Table?
➂ What are the use cases of a View?
➃ Can a View be used to insert/delete records?
➄ How to create/update a View?
➅ What is "WITH CHECK OPTIONS"?
➆ What is a Materialised View? Difference from a View
🚥 Disclaimer
⬘ Most of these questions may have different answers for different databases. Some questions may not apply to all the databases.
⬗ I don't claim only these types of questions are asked during interviews.
⬙ Some of these questions were previously shared by me.
⬘ Most of these questions may have different answers for different databases. Some questions may not apply to all the databases.
⬗ I don't claim only these types of questions are asked during interviews.
⬙ Some of these questions were previously shared by me.
Hey 👋
I am a Tech Writer and Educator from 🇮🇳, sharing
✅ Tutorials
✅ Career Tips
✅ Interview Questions
✅ Roadmaps
on
❯ Web Dev
HTML/CSS, JavaScript, Python
❯ DSA
❯ Databases (SQL, NoSQL)
Are these questions useful? Share your feedback
I am a Tech Writer and Educator from 🇮🇳, sharing
✅ Tutorials
✅ Career Tips
✅ Interview Questions
✅ Roadmaps
on
❯ Web Dev
HTML/CSS, JavaScript, Python
❯ DSA
❯ Databases (SQL, NoSQL)
Are these questions useful? Share your feedback
Loading suggestions...