Oracle multi-Table query page

Source: Internet
Author: User
Bjshasha (silly) on the fifth floor) The score is 0 at 17:54:05.

I got it.
Like this:

Select * from (select rownum as M, A. * From scc_user A) Where m between 3 and 8

Top

Dawnzdy (Dawn) on the 6th floor)The score is 0 at 09:37:40.

Yes, but this is still a single table query. I did it myself. Thank you :)

Select * from

(Select rownum RID, user_id, user_name, user_dept, user_position, user_salary

From
(Select info. user_name, salary .*

From zdy_userinfo info, zdy_salary salary

Where info. user_id = salary. user_id

Order by info. user_id)

) Where RID between 1 and 5;


The table name is unavailable in the layer-2 query. It is invalid. You only need to use the original name of the column.
The second-layer query should not contain info_id; otherwise, the external user_id becomes an unspecified column.

Tested in my program. Take the first 30 items. Major Oracle does not have top commands similar to SQL Server.
Select * from
(
Select a. *, rownum rn from
(Select C. customer_code, C. customer_character, C. customer_officer, C. customer_balance, C. customer_creditline, L .*
From loan_fact_loans l left join loan_fact_customer C on L. customer_id = C. customer_id
Order by loans_balance DESC, loans_date DESC)
) Where rn <= 30

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.