0% found this document useful (0 votes)
7 views

SQL Interview Questions 220725 144802

The document outlines a comprehensive list of questions related to SQL and database management concepts, covering topics such as relational database management systems, SQL commands, normalization, data integrity, and various SQL functions. It includes inquiries about key database components like primary keys, foreign keys, and indexes, as well as practical SQL queries and commands. This serves as a guide for understanding essential SQL concepts and practices.

Uploaded by

Prakriti Anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

SQL Interview Questions 220725 144802

The document outlines a comprehensive list of questions related to SQL and database management concepts, covering topics such as relational database management systems, SQL commands, normalization, data integrity, and various SQL functions. It includes inquiries about key database components like primary keys, foreign keys, and indexes, as well as practical SQL queries and commands. This serves as a guide for understanding essential SQL concepts and practices.

Uploaded by

Prakriti Anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

SQL

Career Cafe
APPROVED

1. What is Relational Database Management System

(RDMBS)?
2. What is Structured Query Language?
3.What is a Database?
4.What is primary key?
5.What is a unique key?
6.What is a foreign key?
7. Explain the difference between spreadsheets and
databases.
8. What are table and fields?
9.Explain the various SQL languages.
10. What is normalization?

11. What is denormalization?

12. Explain the different types of normalization.

13. What are views in SQL?

14. What is join? Explain the different types.

15. What are the different types of indexes?

16. What is a cursor in SQL?


17. What is query?
18. What is a subquery?

19. What is a trigger?

20. Differentiate between the DELETE and TRUNCATE


commands.
21. What are local and global variables?
22. What are constraints?
23. What is data integrity?
24. What is auto increment?
25. What is a data warehouse?
26. What is the difference between DROP and TRUNCATE
statements?
27. What are aggregate and scalar functions?

28. What is alias in SQL?


29. What is the difference between OLTP and OLAP?
30. What is collation? What are the various types of
collation sensitivity?
31. How can we create tables in SQL?
32. How can we insert data in SQL?
33. How can we change a table name in SQL?
34. What is SQL server?
35. What is ETL in SQL?
36. What are nested queries?
37. What is the difference between CHAR and

VARCHAR2 data types in SQL server?


38. What is difference between SQL and PL/SQL?
39. What is the difference between SQL and MySQL?
40. What is cross join?
41. What are user defined functions?

42. What is a CLAUSE?


43. What is recursive stored procedure?
44. Explain UNION, MINUS and INTERACT commands?
45. What TCP/IP port does SQL Server run?
46. Which operator is used in query for pattern
matching?
47. How can we select unique records from a Table?
48. List and explain each of the ACID properties that
collectively guarantee that database transactions are
processed reliably.
49. What is the main difference in the BETWEEN and IN
condition operators?
50. What are SQL functions used for?
51. What is the need for MERGE statement?

52. List the ways in which dynamic SQL can be


executed.
53. List some case manipulation functions in SQL.
54. Is semicolon used after sql? Justify why or why not.
55. What is candidate key?
56. What is the difference between JOIN and UNION?
57. What is the difference between order and group
by?
58. Write an SQL query to fetch employee names
having a salary greater than or equal to 20000 and less
than or equal to 10000.
59. What is SQL injection? When does SQL injection
occur?
60. What is ENUM?
61. What is the difference between the ATAN and ATAN2

function?
62. What is the difference between the CEIL, FLOOR and
ROUND functions?
63. What is the RAND() function?
64. What is the difference between LOCALTIMESTAMP
and CURRENT_TIMESTAMP?
65. Name three functions that specify current date and
time.
66. Which function returns the difference between two
periods? What would the format of the output be?
67. How can we fetch common records from two
tables?
68. How can we fetch alternate records from a table?
69. How can we select unique records from a table?
70. What is the command used to fetch the first 5
characters of the string?
71. How to use LIKE in SQL?

72. How can we copy a table in SQL?

73. If we drop a table, does it also drop related objects?

74. What is Live Lock?


75. Can you join a table by itself?
76. Explain Equi join with an example.
77. Explain non-Equi join with an example.

78. State the difference between NVL and NVL2


functions.
79. What does this query achieve? GRANT
privilege_name ON object_name TO
{user_name|PUBLIC|role_name} [WITH GRANT OPTION]; ?
80. Where is MyISAM table stored?
81. What does myisamchk do?

82. How can we store videos inside SQL server table?


83. Write an SQL query to show the second highest
salary from a table.
84. How would you select all the users whose phone
number is NULL?
85. Write an SQL query to fetch three max salaries from a
table.
86. Write an SQL query to create a new table with data
and structure copied from another table.
87. What are the differences between the HAVING
clause, and the WHERE clause?
88. What does a BCP command do?
89. Can a view be active if the base table is dropped?
90. When should we use NoSQL and SQL?
91. What is SYSTEM privilege?

92. What are object privileges?


93. Does the data stored in the stored procedure
increase access time or execution time? Explain.
94. What is CTE?
95. Does view contain data?
96. Define a temp table.
97. What is the difference between the RANK() and
DENSE_RANK() function?
98. What is referential integrity?
99. What does query optimization imply?
100. What are nested triggers?
101. What is schema in SQL server?

102. Write a query to fetch 50% records from an


EmployeeInfo table.
103. Write a query to add email validation to your
database.
104. What is CTE in SQL server?
105. Suppose you have a sample table of workers,
bonus and title.
106. Write a query to fetch the top N records.

You might also like