-
SQL query
Hi,
I need to create a query.
There is a table area which has fields area_id, area_name, parent_area_id, where parent_area_id is any area_id which can be a parent of that area_id.
I need to pick all those areas and its child areas for a search on name say 'World'
eg: If I have World as parent area and America, Africa , Asia and America has LA,NY,IN, ect and Africa had Africa1, Africa2 etc, and Asia has India, Nepal,Japan, etc. Please provide me a query which with 'World' would give me all the areas and subareas.
Please.............some one help me its really urgent.
Thanks,
SD
-
select e.area_id,e.area_name,m.area_name
from area e,area m
where e.area_id=m.parent_area_id;
Edit by admin: no contact info permitted on the forum, thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|