It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes Union of mysql statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Union of mysql statement" Watch "Union of mysql statement" New topic

Union of mysql statement

malik ge
Ranch Hand

Joined: May 13, 2011
Posts: 69

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.

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32818

Yes. Except for the missing space before and after the "union" keyword, it looks right. What error do you get?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
It is sorta covered in the JavaRanch Style Guide.
subject: Union of mysql statement
jQuery in Action, 3rd edition