SQL Topics & Interview Questions




SQL Topics

Data types , Types of SQL Commands ( DDL , DML , DRL , DCL , TCL )  , Importance of NULL , Importance of && (double am-present) , Operators in SQL , Special operators,  Number functions, Character functions , date functions  , Conversion Functions  ( to_char, to_date , to_number ), aggregate functions , order by , group by, having clause , constraints , sub-queries (Single-row , multi-row , multi-column , co-related, scalar  sub-queries) , pseudo-columns , Joins , Views , Importance of alias, listagg , decode, trunc date function , Indexes , NVL function , coalesce ,null-if ,case statement, extract.


Basic SQL Questions

1.What is SQL?
2.What is a database ?
3.What are the different types of SQL commands?
4.What is the difference between SQL and MySQL?
5.Explain the structure of a SQL query.
6.What is a primary key?
7.What is a foreign key?
8.What are the different data types in SQL?
9.What is a SQL join? Explain the different types.
10.What is the difference between INNER JOIN and OUTER JOIN?
11.How do you filter records using the WHERE clause?
12.What is the purpose of the GROUP BY clause?
13.How do you use the ORDER BY clause?
14.What is the purpose of the HAVING clause?
15.What is the difference between COUNT() and COUNT(DISTINCT)?
16.How do you insert data into a table?
17.How do you update data in a table?
18.How do you delete data from a table?
19.What is normalization? Why is it important?
20.What are indexes in SQL, and why are they used?
21.How do you create a table in SQL?
22.What is a view in SQL?
23.What do you know about sysdate( )?
24.What are aggregate functions? Give examples.
25.What is the purpose of the LIMIT clause?
26.Difference between Char and Varchar2.
27.What are the differences between DELETE, TRUNCATE, and DROP?
28.What is the purpose of the DISTINCT keyword?
29.What is the purpose of the substring function?
30.What do you know about instr( )? 


Intermediate SQL Questions

31.Explain the difference between UNION and UNION ALL.
32.What is a sub-query? When would you use one?
33.What is the difference between a correlated subquery and a non-correlated subquery?
34.How do you use the CASE statement in SQL?
35.How do you use the decode function in SQL ?
36.What are transactions in SQL, and why are they important?
37.What is ACID properties?
38.Explain the differences between clustered and non-clustered indexes.
39.Explain the NVL function  in  SQL.
40.Explain the importance of  LIKE and  NOT LIKE in SQL.
41.How do you use aggregate functions in SQL?
42.What is the output for “sysdate( ) + 1” ?
43.What is the use of the greatest( ) and least ( ) functions?
44.What is the use of to_char( ), to_date( ) , to_number( ) functions?

Practical SQL Questions

45.Write a SQL query to find the second highest salary in a table.
46.How can you find duplicate records in a table?
47.Write a SQL query to get the top 5 sales in a year.
48.Write a SQL query to calculate the average salary per department. 
49.Write a SQL query to count the number of orders placed by each customer.
50.Write a SQL query to display the first and last names of employees in alphabetical order.
51.Write a SQL query to find the employees who joined in the last 30 days.
52.Write a SQL query to list all products with a price greater than the average price.
53.How do you find the nth highest salary in a table?
54.How do you calculate the difference between two dates in SQL?
55.Write a query to find the employees who joined in the year 2002
56.List the employees who joined in the month of which second character is ‘a’.
57.List the employees whose salaries is four digit number ending with zero.
58.List the employees whose names having a character set as ‘kk’ together.
59.List the employees who joined in the month of January.
60.Practice more queries on joins.


Comments

  1. Thank you for information please give me more question

    ReplyDelete
  2. Give me another topic questions thanks bro for information

    ReplyDelete

Post a Comment

Popular Posts

Interview Preparation Tips

My Resume