SQL Interview Questions
Data Science and Data Engineer Interview
- What is normalization?
- What is denormalization?
- Explain the different types of normalization.
- What are views in SQL?
- What is join? Explain the different types. (for join algorithm click here)
- What are the different types of indexes?
- What is a cursor in SQL?
- What is a subquery?
- What is a trigger?
- Differentiate between the DELETE and TRUNCATE commands.
- What is auto increment?
- What is a data warehouse?
- What is the difference between DROP and TRUNCATE statements?
- What are aggregate and scalar functions?
- What is alias in SQL?
- What are Window Functions?
- What is the difference between OLTP and OLAP?
- How can we change a table name in SQL?
- What are nested queries?
- What is the difference between CHAR and VARCHAR2 data types in SQL server?
- What is difference between SQL and PL/SQL?
- What is the difference between SQL and MySQL?
- What is cross join?
- What are user defined functions?
- What is a CLAUSE?
- What is recursive stored procedure?
- Explain UNION, MINUS and INTERACT commands?
- Which operator is used in query for pattern matching?
- How can we select unique records from a Table?
- What is the main difference in the BETWEEN and IN condition operators?
- Is semicolon used after sql? Justify why or why not.
- What is candidate key?
- What is the difference between JOIN and UNION?
- What is the difference between order and group by?
- Write an SQL query to fetch employee names having a salary
- greater than or equal to 20000 and less than or equal to 10000.
- Name three functions that specify current date and time.
- Which function returns the difference between two periods?
- What would the format of the output be?
- How can we fetch common records from two tables?
- How can we fetch alternate records from a table?
- How can we select unique records from a table?
- What is the command used to fetch the first 5 characters of the string?
- How to use LIKE in SQL?
- How can we copy a table in SQL?
- If we drop a table, does it also drop related objects?
- Can you join a table by itself?
- Explain Equi join with an example.
- Explain non-Equi join with an example.
- How can we store videos inside SQL server table?
- Write an SQL query to show the second highest salary from a table.
- How would you select all the users whose phone number is NULL?
- Write an SQL query to fetch three max salaries from a table.
- Write an SQL query to create a new table with data and structure copied from another table.
- What are the differences between the HAVING clause, and the WHERE clause?
- What does a BCP command do?
- Can a view be active if the base table is dropped?
- Does view contain data?
- Define a temp table.
- What is the difference between the RANK() and DENSE_RANK() function?
- What is referential integrity?
- What are nested triggers?
- Write a query to fetch 50% records from an Employee table.
- Write a query to fetch the top N records.
No comments:
Write commentsPlease do not enter spam links