Analysis of oracle tree SQL query

Source: Internet
Author: User

Analysis of oracle tree SQL query: select typecode, lpad ('', 4 * level-1) | typename from ajtype start with p_code is null connect by prior typecode = p_code; Result: 1 + city appearance and sanitation 15 + lighting management 151 + refusal to install 15101 + refusal to install night scene lighting facilities 152 + illegal installation 15201 + installation of night scene lighting facilities not in the specified position 15202 + installation in the prescribed form night scene lighting facilities 15203 + do not install night scene lighting facilities 15204 + do not install night scene lighting facilities 153 + do not light on time www.2cto.com select sys_connect_by_path (typename, '>') typename from ajtype start with p_code is null connect by prior typecode = p_code; 1> city appearance and sanitation 15> city appearance and sanitation> lighting management 151> city appearance and sanitation> lighting management> refusal to install 15101> city appearance and sanitation> light Management> refusal to install night scene lighting facilities 152> City Appearance sanitation> lighting management> Installation in violation 15201> city appearance and sanitation> lighting management> Installation in violation> Installation in non-compliant positions 15202> city appearance and sanitation> lighting management> Installation in violation> not in accordance with regulations installation of night scene lighting facilities

Related Article

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.