Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Newbie: sql query

Newbie: sql query

From: <gfiuni2_at_gmail.com>
Date: 28 Jun 2006 05:50:43 -0700
Message-ID: <1151499043.225637.213670@p79g2000cwp.googlegroups.com>

Hello,

Given the table below:

  id | parent_id


  1    |  NULL
  7    |  1
  9    |  7

  13 | 9
  16 | 13
   .....

I want to get the id of the fisrt register (id=1) given any other id (7, 9 ,13, ..). It is posible to do it with a SQL query or do I need to use PL/SQL?

Thanks in advance,
Jose Luis. Received on Wed Jun 28 2006 - 07:50:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US