Orcle自身连接和内连接

1.同义句sql

select ontology_id,ontology_name from ontology_beta where ontology_parent_id =(select ontology_id from ontology_beta where ontology_name='派件环节'and tree_id='1')

 

 

select t1.ontology_id, t1.ontology_name

  from ONTOLOGY_BETA t1,

       (select t.ontology_id

          from ONTOLOGY_BETA t

         where t.ontology_name ='派件环节') t2

 where t1.ontology_parent_id = t2.ontology_id

   and t1.tree_id =1

Orcle自身连接和内连接_第1张图片

你可能感兴趣的:(oracle数据库)