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!

prime number checking

1043556Jan 12 2016 — edited Jan 13 2016

hi all

in a single select statement can we identify whether the given number is prime r not.

select decode((mod(n,1)=0),'prime','notprime') from dual;  ;n is the value.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 10 2016
Added on Jan 12 2016
12 comments
10,992 views