Swapna Kumar Panda
Swapna Kumar Panda

@swapnakpanda

18 تغريدة 11 قراءة Nov 10, 2021
SQL Interview Questions (S2)
This is the 2nd in this series. Check the first one 👇
Disclaimer:
• The questions covered here are mostly conceptual
• I never claim during interviews, only these type of questions are/should be asked
• For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.
Series: 2️⃣
Level: Beginner
Topics:
1️⃣ Data Types
2️⃣ Operators
3️⃣ Functions
4️⃣ Views
5️⃣ Aggregation
1️⃣ Data Types
* Data Types vary across SQL Vendors like Oracle, MySQL etc. So questions are specific to particular vendors.
✪ When do you define data type of a column?
✪ Can a data type be changed later? What are the restrictions?
✪ What are 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 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/Time Data Types?
2️⃣ Operators
✪ What operator to use to verify if all subqueries meet the condition?
✪ What operator to use to verify if any of the subqueries meet the condition?
✪ What operator to use to check if operand is within a range?
✪ What operator to use to check if operand should one of the given values.
✪ What operator to use to check if a subquery returns at least one record?
✪ What operator to use to check if operand matches a pattern?
✪ What is the difference between BETWEEN and IN operators?
✪ What is the difference between = and LIKE operator?
✪ How to check if a field is containing a NULL value?
✪ What are different comparison operators?
✪ What is the operator to check for not equality?
3️⃣ Functions
✪ What is a SQL function?
✪ What function to use to return current system date and time?
✪ What function to use to find length of a text field?
✪ What function to use to convert a text field to upper/lower case?
✪ How to get a substring?
✪ What are different format options to display a text field?
✪ How to round a numeric field to certain precision?
✪ Give examples of some Date/Time functions?
✪ How to get the year/month/date from a Date field?
✪ How to get last day of the month?
4️⃣ Views
✪ What is a View?
✪ How is a View different from a Table?
✪ What are various 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 with a View?
5️⃣ Aggregation
✪ What do you mean by aggregation?
✪ What is the difference between aggregation and projection?
✪ What does "GROUP BY" statement do?
✪ What is the difference between WHERE and HAVING?
✪ Is "ORDER BY" an aggregation statement?
✪ What function to use to find number of records?
✪ What function to use fetch the first/last value for a field?
✪ What function to use to fetch max/min/average value of a field?
✪ What function to use to find summation of all values for a field?
The next 🧵 of this series will provide questions from
1️⃣ More on DDL
2️⃣ More on DML
3️⃣ Index
4️⃣ Sequence
5️⃣ Trigger
Check 👇 for "Interview Questions" on few other subjects.

جاري تحميل الاقتراحات...