This document discusses various SQL concepts and techniques including:
1. The differences between DDL and DML commands, truncate vs delete vs drop, group by with examples, where and having clauses, scalar vs aggregate functions, and coalesce functions.
2. Constraint types including primary keys, foreign keys, and unique keys. Joins including inner, left, right, full, cross, and self joins. Window functions like row_number(), rank(), and dense_rank().
3. Removing duplicate records, indexes, stored procedures, functions, views, triggers, and the differences between SQL and PL/SQL.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
21 views1 page
Interviewquestions SQL
This document discusses various SQL concepts and techniques including:
1. The differences between DDL and DML commands, truncate vs delete vs drop, group by with examples, where and having clauses, scalar vs aggregate functions, and coalesce functions.
2. Constraint types including primary keys, foreign keys, and unique keys. Joins including inner, left, right, full, cross, and self joins. Window functions like row_number(), rank(), and dense_rank().
3. Removing duplicate records, indexes, stored procedures, functions, views, triggers, and the differences between SQL and PL/SQL.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1
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 ?