oracle - How can I use having without group by? -


i reading having clause in oracle.

it written in docs that

if there no group clause, having clause applied entire result single group.

but whenever tried use having clause without group by, getting syntax error.

how can use having without group by?

can explain me schema?

sql fiddle

a simple experiment prove possible:

select * dual having 1=1 

this query run in oracle 11g. suspect problem you're seeing you're trying use aggregate function in having clause , not allowed group by clause.

while it's possible use having without group by, don't see point. condition put in having clause in scenario more appropriate in where clause.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -