0% found this document useful (0 votes)
6 views3 pages

SQL Questions

The document contains a comprehensive list of SQL questions categorized into basic, intermediate, practical, conceptual, and advanced topics. It covers fundamental concepts such as SQL commands, keys, joins, and constraints, as well as practical query examples and advanced topics like normalization, indexing, and transactions. This structured approach serves as a guide for learning and testing SQL knowledge.

Uploaded by

scubegaming236
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)
6 views3 pages

SQL Questions

The document contains a comprehensive list of SQL questions categorized into basic, intermediate, practical, conceptual, and advanced topics. It covers fundamental concepts such as SQL commands, keys, joins, and constraints, as well as practical query examples and advanced topics like normalization, indexing, and transactions. This structured approach serves as a guide for learning and testing SQL knowledge.

Uploaded by

scubegaming236
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/ 3

SQL Questions

Basic SQL Questions

1.​ What is SQL?​

2.​ What are the different types of SQL commands?​

3.​ What is a primary key?​

4.​ What is a foreign key?​

5.​ What is the difference between WHERE and HAVING?​

6.​ What is a JOIN?​

7.​ What are the types of JOINs in SQL?​

8.​ What is the difference between INNER JOIN and LEFT JOIN?​

9.​ What is a NULL value?​

10.​How to filter NULL values?​

Intermediate SQL Questions

11.​What is the difference between DELETE and TRUNCATE?​

12.​What is the use of the DISTINCT keyword?​

13.​What is an alias in SQL?​

14.​How do you sort data in SQL?​

15.​What does the GROUP BY clause do?​

16.​What is a subquery?​

17.​What is the difference between subquery and JOIN?​


18.​What is a constraint in SQL?​

19.​What is a UNIQUE constraint?​

20.​What is the default sorting order in SQL?​

Practical SQL Query Questions

21.​Write a query to find all employees in the “Sales” department.​

22.​Find the highest salary from the employee table.​

23.​Count the number of employees in a table.​

24.​Find employees whose names start with ‘A’.​

25.​Find the total salary of all employees.​

26.​How to update the salary of an employee?​

27.​How to delete an employee record?​

28.​How to add a new column to an existing table?​

29.​How to rename a column in a table?​

30.​How to find the second highest salary in a table?​

Conceptual SQL Questions

31.​What is normalization?​

32.​What is denormalization?​

33.​What is an index in SQL?​

34.​What are the different types of indexes?​


35.​What is a view in SQL?​

36.​What is a stored procedure?​

37.​What is a trigger in SQL?​

38.​What is ACID in databases?​

39.​What is a transaction in SQL?​

40.​What is a composite key?​

Advanced/Additional SQL Questions

41.​What is a schema in SQL?​

42.​What is the difference between CHAR and VARCHAR?​

43.​What is a temporary table?​

44.​What is the BETWEEN operator?​

45.​What are wildcards in SQL?​

46.​How to find duplicate records in a table?​

47.​How to get the current date in SQL?​

48.​How to get only unique values from a column?​

49.​How to combine results from two SELECT queries?​

50.​What is the use of the CASE statement in SQL?​

You might also like