SQL Basics
1. Difference between DDL and DML commands
2. Difference between Truncate v/s Delete v/s drop ?
3. usuage of Group by with example ?
4. Difference between where clause and having clause ?
5. Difference between scalar functions and aggregate functions ?
6. Coalesce function in sql ? coalesce()
7. Contraints and different types of constraints ?
8. Difference between primary key and foreign key
9. Difference between primary key and unique key?
10. How many primary keys a table can have?
11. composite key (combination of multiple columns )
12. Joins and types - INNER, LEFT,RIGHT, FULL, CROSS, SELF
13. HOW MANY JOIN YOU WILL APPLY TO JOIN 500 TABLES ? (499)
N TABLES - > N-1 JOINS
15. CROSS JOIN /CARTESIAN JOIN = A(5)X B(6) -> A*B = 30 RECORDS
16. WHAT IS UNION AND UNION ALL
17. WHICH ONE, UNION OR UNION ALL IS FASTER IN TERMS OF PERFORMANCE ?
18. ORDER OF SQL STATEMENTS ( SELECT, FROM , WHERE, GROUP BY, ORDER BY,
HAVING ,LIMIT)?
19. CAN I USE HAVING WITHOUT GROUP BY
20. SELF JOIN - EMPLOYEE NAME AND THEIR MANAGERS NAME
21. HAVE YOU WORKED ON WINDOW FUNCTIONS/ ADVANCED FUNCTIONS/ANALYTICAL FUNCTIONS
(ROW_NUMBER(), RANK(), DENSE_RANK(), LEAD(),LAG() )
22. RANK() V/S DENSE_RANK()
23. Nth HIGHEST SALARIED EMPLOYEE
24. NTH HIGHEST SALARIED EMPLOYEE WITHIN THEIR DEPARTMENT
KNOWLEDGE ON PL/SQL
26. WHAT IS STORED PROCEDURE
27. WHAT IS FUNCTIONS
28. WHAT IS THE DIFFERENCE BETWEEN STORED PROCEDURE AND FUNCTIONS
29. WHAT IS THE DIFFERENCE BETWEEN VIEW AND TABLE
30. HAVE YOU WORKED ON INDEXES ? WHY DID YOU CREATE ? CLUSTETED AND NON-CLUSTERED
31. DIFFERENCE BETWEEN SQL AND PL/SQL?
32. WHAT ARE TRIGGERS AND REALTIME USECASE?
33. HOW TO REMOVE DUPLICATE ROWS/RECORDS IN A TABLE ?