-
combine 4 queries into one
hi friends,
it should be simple though but i dont know how to do it...
i have the following 4 queries:
select pk_id as touristplaces from city_tourist_places ctp where ctp.city_id=2
select cti.pk_id as traininfo from city_train_info cti where cti.city_id=2
select cfi.pk_id as flightinfo from city_flight_info cfi where cfi.city_id=2
select restaurant_id as restaurant from city_restaurant cr where cr.city_id=2
i want to write only one single query.
im only checking if a record exist for the specific city_id in all the above queries, please note city_id is exist in all tables.
im using mysql 4.1.12.
regards
sanjeev
-
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
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
|
|
Bookmarks