This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JDBC 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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Union of mysql statement" Watch "Union of mysql statement" New topic
Author

Union of mysql statement

malik ge
Ranch Hand

Joined: May 13, 2011
Posts: 69
Hi,

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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29233
    
138

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


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
 
subject: Union of mysql statement
 
Similar Threads
SQLException beteen correlation and exposed name
PreparedStatement Error
Jsp Login Page Problem
Oracle Pivot table
Union