609 views
0 votes
0 votes
Q which statement is false??

1.  A SQL query can have a ' having' clause without having containing group by clause.

           => i think its true

2. in SQL we can use aggregate function without using GROUP by clause

  ===> i think its true

but made easy given both of  false answer...so i am confused.....

2 Answers

1 votes
1 votes
Both statements are true.

You can use having without group by but it will be as good as where clause.

For second, reference:http://stackoverflow.com/questions/6467216/is-it-possible-to-use-aggregate-function-in-a-select-statment-without-using-grou
0 votes
0 votes
1 - Having canot be used without the group by clause the execution pattern is

from , where group by , having, order by, limit.

HAving is used to apply condition on grups created.

2-Specfically talking about sql., We can use the aggregate function without group by but many other impleentation of rdbms does not allow this. 2 statment is talking about about Mysql so second is true by sql standards

No related questions found