SQL Interview Questions

SQL Interview Questions

  1. What is SQLPlus?
  2. What is deadlock?
  3. What is reference cursor?
  4. Explain about SQL related to RDBMS?
  5. What are the two components of ODBC?
  6. What are two methods of retrieving SQL?
  7. How to test data loading in database testing?
  8. How to store directory structure in a database?
  9. What are the various uses of database triggers?
  10. How can variables be passed to a SQL routine?
  11. Does SQL SERVER Supports “Finally” block?
  12. Difference between VARCHAR and VARCHAR2?
  13. What is a join? Explain the different types of joins?
  14. What is the difference between varchar & varchar2?
  15. What is the fastest way of accessing a row in a table?
  16. What is the difference between SQL and SQL Server?
  17. What are the disadvantages of the client/server model?
  18. How to find out the 10th highest salary in SQL query?
  19. Can we call user defined packages in SQL statements?
  20. How you define which session run and how long time?
  21. What description of a data source is required for ODBC?
  22. What is a default TCP/IP socket assigned for SQL Server?
  23. What is normalization and different kinds of normalization?
  24. What is the difference between file server and a database server?
  25. Which of the following statements is true about implicit cursors?
  26. Explain the concept of joins and list out the different type of joins?
  27. Which date function is used to find the difference between two dates?
  28. What are steps required tuning this query to improve its performance?
  29. How to find out the database name from SQL*PLUS command prompt?
  30. What are the privileges that can be granted on a table by a user to others?
  31. How to write a Sql statement to find the first occurrence of a non zero value?
  32. When size of database is long then how we can divide it into more databases?
  33. What is the main difference between the IN and EXISTS clause in sub queries?
  34. What are the advantages and disadvantages of primary key and foreign key in SQL?
  35. Which system tables contain information on privileges granted and privileges obtained?
  36. Why do we use cache and no cache in sequences? What is the benefit we have in using them?
  37. You want to include a carriage return/linefeed in your output from a SQL script, how can you do this?
  38. Why is it better to use an integrity constraint to validate data in a table than to use a stored procedure?
  39. Can we connect two different relational tables from different data sources and get the output as one flat file?
  40. How to get the first day of the week, last day of the week and last day of the month using T-SQL date functions?