MySQL Forums
Forum List  »  MyISAM

Re: Result Set Differentiation..!!
Posted by: Rick James
Date: March 04, 2012 06:58PM

I do _not_ understand what you are trying to do. See if this helps:

(select 1 as rs, col1, col2, col3 from db.tbl where condition) as rsdb1)
UNION ALL
(select 2 as rs, col1, col2, col3 from db.tbl2 where condition) as rsdb2)
UNION ALL
(select 3 as rs, col1, col2, col3 from db.tbl3 where condition) as rsdb3)
UNION ALL
(select 4 as rs, col1, col2, col3 from db.tbl4 where condition) as rsdb4)
;

Options: ReplyQuote


Subject
Views
Written By
Posted
2824
March 02, 2012 04:49AM
Re: Result Set Differentiation..!!
1638
March 04, 2012 06:58PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.