1.11M Members

self related table problem

 
0
 

Hi all
I have following table structure

pk_cat_id(int)     cat_name(varchar)     cat_desc(text)    fk_cat_id(int)

table is self related as one to many

i want to select cat_name, cat_desc and parent_cat_name()
i.e.
from fk_cat_id, how i can get cat_name

 
1
 

Presumably it's

select child.cat_name, child.cat_desc, parent.cat_name
from mytable child, mytable parent
where child.pk_cat_id = parent.fk_cat_id
Question Answered as of 2 Years Ago by smantscheff
 
0
 

Thanks to all
Solved my problem :)

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: