Discussion: column alias on mass
Afficher un message
Vieux 02/05/2006, 14h40   #1
sks
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut column alias on mass

Hi all,

Is possible to retrieve all columns and alias them all at once. Eg, normally
you would write

select * from products which would return

id | name | price
-----------------------
1 | Test | 14.00

but I want to be able to say

select p.* from products p, so that it returns the columns as such

p.id | p.name | p.price

Obviously I can do this manually as such

select p.id, p.name, p.price from products p ....

But that would take a lot of big queries as some of my tables have 50
columns.


  Réponse avec citation
 
Page generated in 0,04303 seconds with 9 queries