Reply to Re: query...

Your name:

Reply:


Posted by Beowulf on 03/17/06 21:14

rj wrote:
>> Hi all,
>>
>> I have a table with columns:
>> Name, english, french, spanish, german
>> values (eg)
>> John, 20, 20, 30, 30
>> I want to diplay the data as:
>> john, 20 john, 20 john, 30 john, 30
>> how do i do this?
>>
>> Thanx in advance..
>Madhivanan wrote:
> Select Name, english from table
> union all
> Select Name, french from table
> union all


Assuming english, french, spanish, and german are all in the same table,
as you stated above, it seems a simple select query can accomplish
what you want without the overhead of UNION (not sure if that's an issue):

SELECT Name, english, Name, french, Name, spanish, Name, german
FROM table

will display:
john, 20, john, 20, john 30, john, 30

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация