Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Database - Interview Questions and Answers for 'Deloitte' - 3 question(s) found - Order By Newest | ||||
| ||||
Ans. Select salary from (select salary from employee where department = order by salary desc limit 5) emp order by salary limit 1 AND Select salary from (select salary from employee where department = order by salary desc limit 2) emp2 order by salary limit 1 | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  sql  database   find 2nd highest salary sql database Asked in 1 Companies | ||||
Related Questions | ||||
What are Inner , Outer , Left and Right Joins in SQL ? | ||||
What is JDBC? Describe the steps needed to execute a SQL query using JDBC. | ||||
What are temp tables ? | ||||
What is a self Join and give an example of a self Join ? or What is self Join and What is it's purpose ? | ||||
Do you like Native SQL Apis like JDBC or JPA / Hibernate ? | ||||
Is there any schema in mongo DB ? | ||||
Difference between Inner and Outer Join ? | ||||
What is a Cursor ? | ||||
Does SQL allow null values ? Can we use it within Where clause ? | ||||
Write an SQL to find all records having all upper case alphanumeric characters in a field ? | ||||
| ||||
Ans. Use Comparable or Comparator interface | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  sql query Asked in 1 Companies | ||||
Related Questions | ||||
What is JDBC? Describe the steps needed to execute a SQL query using JDBC. | ||||
create an SQL query across multiple tables involving outer joins | ||||
Write SQL query to join 2 tables ? | ||||
| ||||
Ans. Primary key will not accept NULL values whereas Unique key can accept one NULL value. A table can have only primary key whereas there can be multiple unique key on a table. A Clustered index automatically created when a primary key is defined whereas Unique key generates the non-clustered index. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Unique Key  Primary Key Asked in 1 Companies | ||||
Related Questions | ||||
Difference between composite , primary and unique key ? | ||||