Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

to know parent table have child table with records

muttleychessFeb 7 2017 — edited Feb 9 2017

Hi

I have a table with many child table

example:

create table t_parent (id number);

 

  create table t_child01 (id number,

                          id_tparent number

                     CONSTRAINT fk_child01

    FOREIGN KEY (id_tparent)

    REFERENCES t_parent(id)     ); 

   

    create table t_child02 (id number,

                          id_tparent number

                     CONSTRAINT fk_child02

    FOREIGN KEY (id_tparent)

    REFERENCES t_parent(id)     );   

   

      create table t_child03 (id number,

                          id_tparent number

                     CONSTRAINT fk_child03

    FOREIGN KEY (id_tparent)

    REFERENCES t_parent(id)     );   

    What best way to see is there some table there some record ?

       I think count(id) each table, Is it best way ?

TIA

This post has been answered by Cookiemonster76 on Feb 7 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 9 2017
Added on Feb 7 2017
26 comments
6,721 views