SQL/PL-SQL Questions

Q1. Explain about different types of joins in SQL with simple examples and queries.
Q2. What is the difference between rowid and rownum?
Q3. Explain about Primary key, Foreign key, Surrogate key, Unique key, Candidate key, Composite key and natural key with examples.
Q4. Explain about unique index, primary index, secondary index, clustered index, non clustered index.
Q5. What are the table constraints and column constraints?
Q6. Explain about referential Integrity and how do you test them?
Q7. Explain 10 oracle functions like substring, instring etc.. with syntax.
Q8. What are the difference between DDL, DML and DCL commands?
Q9. What is the difference between TRUNCATE, DELETE and DROP commands?
Q10. How does one escape special characters when writing SQL queries?
Q11. Can one select a random collection of rows from a table?
Q12. How does one eliminate duplicate rows from a table?
Q13. How does one get the time difference between two date columns?
Q14. How does one select EVERY Nth row from a table?
Q15. How does one select LAST N rows from a table?
Q16. How does one select TOP N rows from a table?
Q17. What is the difference between VARCHAR, VARCHAR2, and CHAR data types?
Q18. What are stored procedures?
Q19. How to test a stored procedure?
Q20. What is the basic structure of Stored Procedure?
Q21. What is cursor?
Q22. What is the difference between sub query and nested query?
Q23. How do you use group by clause?
Q24. What is self join? How and when do you use it?
Q25. When do you use order clause?
Q26. What is schema?
Q27. How many tables are there in your schema? And how do you check it?
Q28. Explain a SQL to get the maximum length of a column?
Q29. What is the difference between function and procedure?
Q30. What is the difference between where and having Clause?
Q31. What is the difference between union, union all?
Q32. How do you improve query performance?

No comments:

Post a Comment