How to select N records in a select in Oracle plsql?

Asked

Viewed 438 times

-1

I have 3 tbs, I make the following catch the id of tb1 in common with tb2 and tb3(id ), then compare if field 1 of tb1(LENGTH) is larger than field 1 of t2, in tbs 1 and 2 there are several ids of tb3, (it is necessary to go through tbs 2 and 3 all making this comparison) how many records take too long, so would like a select bringing only a few ids to do little by little..

  • In case you want to limit the number of records of the query to 5?

  • I have 3 tbs, I do the following by taking the id of tb1 in common with tb2 and tb3(id ), then comparing if field 1 of tb1(LENGTH) is larger than field 1 of t2, in tbs 1 and 2 there are several ids of tb3, (it is necessary to go through tbs 2 and 3 all making this comparison) how many records take too long, so would like a select bringing only a few ids to do little by little..

  • @Janicecarvalho The answer solved your question? Do you think you can accept it? See [tour] if you don’t know how to do it. This would help a lot to indicate that the solution was useful for you. You can also vote on any question or answer you find useful on the entire site (when you have 15 points).

1 answer

1

  • Thanks ,in this case does not meet in 11g, it is necessary to go through the whole tb making comparisons, thence I get the largest field between 3 tb, however are many ids, so I would like to compare 50 by 50 for example.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.