Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

2 tables same layout want to use only one where clause

select * from a_messages2 where profile_id like 'kb%'
union
select * from a_messages where profile_id like 'kb%'
order by message_text

same table layout
order by message_text applys to both tables

I tried putting where profile_id like 'kb%'  and got error
ASKER CERTIFIED SOLUTION
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgb192

ASKER

thanks for query and thanks for performance advice