Oracle Oracle Product Services and Technology level introduction
Many friends ask the genuine Oracle database products and pirated products are mainly different, in fact, from the product technology itself, the difference is not small, can
Oracle many friends ask genuine Oracle database products and pirated products what is the difference, in fact, from the product technology itself, the difference is not small, you can download a database from the OTN website products, and then
Connect by prior recursive algorithm for tree data (parent/child data) retrieval in Oracle
1. Complete example:
Select PID, ID, name, deptid, level, sys_connect_by_path (name ,'/'), connect_by_root PID as rootid from t_wf_eng_wfkind where deptid
Find the leader with employee number 7369:
1 SELECT level,e.* from EMP E CONNECT by PRIOR e.mgr = e.empno 78762 order by level
DESC
' Start with '--this identifies all level=1 nodes
"Connect by"--describes you to walk from the parent nodes above
Find leaders with employee number 7369:1 SELECT level,e.* from EMP E CONNECT by PRIOR e.mgr = E.empno START with e.empno = 78762 ORDER by Level DESC' Start with '--this identifies all level=1 nodes in the tree"Connect By" – describes how to walk
Detailed description of start with... connect by statement
Simple tree query for Oracle (recursive query)
Deptid
Paredeptid
Name
Number
Number
Char (40 bytes)
Department ID
Parent department ID
Content from: Oracle®database SQL Language Reference 11g Release 2 (11.2) e41084-03.Empolyees table from the HR scheme, warehouses from the OE scheme.
If your table contains hierarchical data, you can use hierarchical query clauses to select
recursive queries in Oracle can be used by: Select, start with, connect by.. Prior The following describes the common ways in which tree queries are used in Oracle, with only one table involved. I. Build a TABLE statement:--Menu directory Structure
Reprinted from: http://blog.csdn.net/leshami/article/details/5917103The Oracle client connection to the Oracle database server looks different from the network configuration in SQL serve, except that all SQL Server runs on the Windows platform, so
If the table contains hierarchical data, you can use the Hierarchy query clause to select the row-level order. 1. The grammar of the hierarchy query clause
Hierarchy query clause syntax:
{CONNECT by [nocycle] condition [and condition] ... [START
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.