Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merge result sets

Status
Not open for further replies.

itsricky

Programmer
Jul 29, 2005
2
US
Hello,

I know I can do this with UNION but I would like to know some other ways? Is it possible to stack columns within the same table?

Example:

Select col1, col2, col3

Result:

col1
col2
col3

Thanks in advance!

Ricky
 
No, it would not be SQL then.
UNION is best can do, in this case probably UNION ALL.

Only: when doing that in an application you still can select all three columns and present the data the way you want in only one column.
That way you need only one select statement.


Juliane
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top