Interview Questions and Answers - Order By Newest Q31. Which is the best NoSql Database for Performance ? NoSql
Ans. Possible Answer - doument base - monogodb Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Nosql Database Q32. Write a SQL to find 2nd Max value in a Table. Database
Ans. SELECT MIN(FIELD) FROM (SELECT TOP 2 FIELD FROM TABLE ORDER BY FIELD DESC)
or
SELECT MAX(FIELD) FROM TABLE WHERE FIELD NOT IN (SELECT MAX(FIELD) FROM TABLE) Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql Q33. Write a SQL to find max salary by Dept SQL
Ans. SELECT MAX(SALARY),DEPT FROM EMPLOYEE GROUP BY DEPT Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q34. Write a SQL to display all duplicate names from Employee Table SQL
Ans. SELECT * FROM EMPLOYEE A WHERE A.ROW_ID IN (SELECT MAX(ROW_ID) FROM EMPLOYEE b WHERE A.NAME = B.NAME ) Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q35. Write an SQL to get Employees who are also Managers SQL
Ans. SELECT A.NAME FROM EMPLOYEE A, EMPLOYEE B WHERE A.ID = B.MANAGER_ID Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Ans. It returns all the rows form the left table and matches the rows in both tables. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  database   database joins   left outer join  sql Asked in 2 Companies Ans. Oracle having following types of joins these are also called 8i joins. There are:
1. Equi (or) Inner join
2. Non Equi join
3.Self join
4.Outer join
Oracle also support the 9i (or) ANSI standard joins.There are:
1.Inner join
2.Left outer join
3.Right outer join
4.Full outer join
5.Natural join Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql joins  sql Asked in 2 Companies Q38. What are different in memory data structures that are used in No Sql Database ? NoSql Database
This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q39. What are different types of No Sql Databases ? NoSql
Ans. graph based
column based
document based Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q40. Difference between Left and Inner Join ? SQL
This question was recently asked at 'Canopy Tax,Cogent Infotech Corp'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql Asked in 2 Companies Q41. Write SQL to get all members and the count of books they have checked out , even the ones that haven't checked out anything. SQL
This question was recently asked at 'Canopy Tax'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  database  sql Asked in 1 Companies Q42. Given an Employee Table with Salary Column, Find 2nd and 5th highest salary in a particular department. SQL
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 Q43. What is the use of sql dialect ? Hibernate
Ans. Dialect means "the variant of a language".
Similarly in case of SQL Dialect we specify what dialect of SQL to be generated keeping in mind of underlying database. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql dialect  hibernate   hibernate Asked in 2 Companies Ans. Fast reads
Much more reads than writes Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws dynamodb  aws nosql database  amazon cloud nosql database Q45. create an SQL query across multiple tables involving outer joins Database
Ans. Select * from table1 t1Left outer join table2 t2 on t1.tid = t2.id Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql query  database  outer joins Asked in 2 Companies Ans. No Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws dynamodb  aws nosql database  amazon cloud nosql database Q47. What is the minimum number of tables required to perform a SQL join? Database
Ans. 1 , We can do self join
Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql join Asked in 1 Companies Q48. Sort an Employee Object based on Name or Age Database
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 Q49. Write SQL query to join 2 tables ? SQL
Ans. Select * from table1 join Select * from table2 Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  database Asked in 1 Companies Q50. In majority of the cases, the following join will give maximum number of results ? Reference Database
a. Inner Join b. Outer Join c. Left Join d. Right JoinAns.b. Outer Join
a. Left Join and Right Join gives equal number of Results b. Outer Join and Inner Join gives equal number of Results c. Inner Join gives maximum number of results records d. Inner Join gives minimum number of result recordsAns.d. Inner Join gives minimum number of result records