Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Select MIN OR greater than something

987522Feb 18 2013 — edited Feb 19 2013
Hi

I need to select a MIN value from column, but if that column contains something bigger than X, then I want to select that something.

Example :

Column
3
9
7

I want to select 3, because ther is nothing that's greater than 10. BUT if column looks like this:

Column
3
9
12
7
15

I want to select 12, because it's the smallest number that is greater than 10.

How can I do such a thing? If I can, that is...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 19 2013
Added on Feb 18 2013
10 comments
1,254 views