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!

SQL Puzzle: Prime Numbers

SQL-PatternsMay 18 2016 — edited May 26 2016

With a single SELECT statement produce a list of first 10 prime numbers above a given number of N.


Expected Result (for N=15)


Prime

----------

        17

        19

        23

        29

        31

        37

        41

        43

        47

        53

10 rows selected.

Expected Result (for N=50)


Prime

----------

        53

        59

        61

        67

        71

        73

        79

        83

        89

        97

***Moderator action (Timo): removed link to the webpage as it's assumed to be spam! User, please refrain from posting links to your web page here!***

This post has been answered by jihuyao on May 18 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 23 2016
Added on May 18 2016
39 comments
4,537 views