MySQL Forums
Forum List  »  General

Getting all union rows
Posted by: trala2003
Date: January 23, 2005 06:51PM

Hi!

I am trying union for sql. As below, I require "select 1 union select 1" to show 2 different "1" rows, but this is not happening. I understand this is not a bug, but for my purpose, how do you guys think I could write an equally simple query for this purpose ?

Thanks!

mysql> select 1 union select 2;
+---+
| 1 |
+---+
| 1 |
| 2 |
+---+
2 rows in set (0.01 sec)

mysql> select 1 union select 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.01 sec)

Options: ReplyQuote


Subject
Written By
Posted
Getting all union rows
January 23, 2005 06:51PM
January 23, 2005 07:34PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.