๐ฅ 4 Most Asked SQL Theoretical Interview Questions ๐ฅ
โ 1. What is the difference between WHERE and HAVING?
โ
WHERE filters rows before aggregation.
โ
HAVING filters groups after aggregation.
๐ก WHERE โ Rows | HAVING โ Groups
โโโโโโโโโโโโโโ
โ 2. What is the difference between RANK(), DENSE_RANK(), and ROW_NUMBER()?
โ
ROW_NUMBER() โ Unique number for each row
โ
RANK() โ Skips ranks after ties
โ
DENSE_RANK() โ No skipped ranks after ties
๐ก A favorite topic in SQL interviews.
โโโโโโโโโโโโโโ
โ 3. What is a CTE?
โ
CTE (Common Table Expression) is a temporary result set created using the WITH clause.
๐ก Helps make complex queries cleaner and easier to understand.
โโโโโโโโโโโโโโ
โ 4. What is the difference between DELETE, TRUNCATE, and DROP?
๐๏ธ DELETE โ Removes selected rows
โก TRUNCATE โ Removes all rows
๐ฅ DROP โ Removes the entire table
โโโโโโโโโโโโโโ
React โฅ๏ธ for more interview questions
Post #2220
1.65K
- โค 7