Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Union of mysql statement
Joined: May 13, 2011
Nov 13, 2011 10:35:20
Is it possible to get the result of two sql statements by using keyword "Union" in Java like this...
If yes, can you tell me how to do that.
String sql = "Select * from tblUsers , tblRoles where tblUsers.tblRoles_id = tblRoles.id and tblRoles.id = 1"+ "Union"+ "Select * from tblUsers , tblRoles where tblUsers.tblRoles_id = tblRoles.id and tblRoles.id = 2" ;
Joined: May 26, 2003
Nov 13, 2011 10:55:06
Yes. Except for the missing space before and after the "union" keyword, it looks right. What error do you get?
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
subject: Union of mysql statement
SQLException beteen correlation and exposed name
Oracle Pivot table
Jsp Login Page Problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013