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!

Shorter use of UNION?

Status
Not open for further replies.

Sleidia

Technical User
May 4, 2001
1,284
FR

Hello,

Is it possible to avoid listing all the columns when you use UNION?

I'm looking for a way to use ' * ' ... something that would look like this :

Code:
SELECT 
*
FROM 
my_table

UNION

SELECT 
'' as *
FROM 
my_table

Thanks! :)
 
could you explain why you are trying to do that?

obviously what you wrote won't work

you seem to want to return all columns of all rows and then something else? what's the something else for?

r937.com | rudy.ca
Buy my new book Simply SQL from Amazon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top