mysql query write using join :
two query convert into one query using join
//1st query :
SELECT b.all_users_email,b.room_id FROM rbs_room_booking b WHERE b.booking_id = 277
SELECT b.all_users_email,b.room_id, r.ud_room_id, r.room_name, r.room_type,r.capacity
FROM rbs_room_booking b
JOIN rbs_room r ON r.room_id = b.room_id
WHERE booking_id = 277
//2nd query :
SELECT ud_room_id, room_name, room_type,capacity FROM rbs_room r WHERE room_id = 41
No comments:
Post a Comment