This week's book giveaway is in the
We're giving away four copies of
and have John Sonmez on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
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
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" ;
author & internet detective
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
Jsp Login Page Problem
Oracle Pivot table
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014