Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6777525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:09:30+00:00 2026-05-26T16:09:30+00:00

A quick one here. So I read about rownum around the web and am

  • 0

A quick one here. So I read about rownum around the web and am trying to see
which way to call it is best since based on SQL Optimizer both approach shows
no difference.

select count(distinct BCC || '~' || BN) BCCN 
from LINK_TBL 
where AN = 'abcdefg' 
and BR = 1 
and rownum <= 5;

or

select count(distinct BCCN)
from (
select BCC||'~'|| BN BCCN 
from LINK_TBL 
where AN = 'abcdefg' and BR = '1'
)
where rownum <= 5;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:09:30+00:00Added an answer on May 26, 2026 at 4:09 pm

    The optimizer can choose to solve / reorganise your query as it sees fit, as long as it provides the right results. If you check the explain plan, you may find them identical.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quick one, but thought I'd ask. Is there a better way of getting the
Is there a quick one-liner to call datepart in Sql Server and get back
What's a quick-and-dirty way to make sure that only one instance of a shell
JasperReports newbie here. I have read the tutorial and the quick reference and read
Here's a quick one... In Python one can do: foo = foo1 if bar1
Thanks for taking the time to read... here is my question/scenario, its a quick
Just a quick one here. What are the benefits of using java.io.Console as opposed
Hopefully just a quick one. In XCode, trying to import a file called cocos2d.h
Hopefully this is a quick easy one for you. Here is my code: var
Just a quick one here, does anyone know of a good regular expression for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.