why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More SQL PLSQL Interview Questions

List out the acid properties and explain?

0 Answers  


what is bulk bind

4 Answers   TCS,


Can we insert in view in sql?

0 Answers  


What is a bitmap index?

4 Answers   Choice Solutions, Infosys,


What are sql functions? Describe in brief different types of sql functions?

0 Answers  






1. is it possible to use the cursor atttibutes (%found ,% rowcount , %isopen , %notfound ) to our user defined cursor names ....... cursor cursor_name is select * from scott.emp if you use... cursor_name%found , %rowcount ,%isopen,%notfound...will it work... -------------------------- 2.what is the difference between the varray and index by table .. -------- 3. type type_name is table of number(8,3) index by binary_integer; identifier_name type_name; first , last , prior , next ,trim are the methods we can use it for the above type...simillary is there any way to apply for cursors... with thanks and regards..sarao...

0 Answers   Satyam,


how to check the 3rd max salary from an employee table? One of the queries used is as follows: select sal from emp a where 3=(select count(distinct(sal)) from emp b where a.sal<=b.sal). Here in the sub query "select count(distinct(sal)) from emp b where a.sal<=b.sal" or "select count(distinct(sal)) from emp b where a.sal=b.sal" should reveal the same number of rows is in't it? Can any one here please explain me how is this query working perfectly. However, there is another query to get the 3rd highest of salaries of employees that logic I can understand. Pls find the query below. "select min(salary) from emp where salary in(select distinct top 3 salary from emp order by salary desc)" Please explain me how "select sal from emp a where 3=(select count(distinct(sal)) from emp b where a.sal<=b.sal)" works source:http://www.allinterview.com/showanswers/33264.html. Thanks in advance Regards, Karthik.

4 Answers  


What is dml and ddl?

0 Answers  


What programs use sql?

0 Answers  


Does asenumerable execute the query?

0 Answers  


What are literals in sql server?

0 Answers  


Why are cursors used?

0 Answers  


Categories