Hello,
 
I have one SQL question:
 
I do:
 
SELECT geo_continents.name, geo_countries.name from geo_continents,
geo_countries WHERE geo_continents.id=geo_countries.continent;
 
what gives me:
 
+---------------+--------------------------------+
| name          | name                           |
+---------------+--------------------------------+
| Asia          | Afghanistan                    |
| Asia          | Armenia                        |
| Asia          | Azerbaijan                     |
| Asia          | Bahrain                        |
| Asia          | Bangladesh                     |
..... tra la la
| Europe        | Switzerland                    |
| Europe        | Ukraine                        |
| Europe        | United Kingdom                 |
| Europe        | Vatican City State             |
..... tra la la
| North America | Antigua And Barbuda            |
| North America | Bahamas                        |
| North America | Barbados                       |
+---------------+--------------------------------+
 
How do I construct a query which would output me continent name only once,
having all the rest empty.
something like this:
 
+---------------+--------------------------------+
| name          | name                           |
+---------------+--------------------------------+
| Asia          | Afghanistan                    |
|                | Armenia                        |
|                | Azerbaijan                     |
|                | Bahrain                        |
|                | Bangladesh                     |
..... tra la la
| Europe        | Switzerland                    |
|                  | Ukraine                        |
|                  | United Kingdom                 |
|                  | Vatican City State             |
..... tra la la
| North America | Antigua And Barbuda            |
|                    | Bahamas                        |
|                    | Barbados                       |
+---------------+--------------------------------+
 
 
Any way to do it with mySQL 3.22.xx?
what about 3.23.xx ?
Can one field be LIMITed and another not?
 
I would like it to minimize the amount of data sent.
(in the soft. this query will repeat itself quite a bit of times....)
 
P.S: sorry if the question is too stupid, but my 'SQL skills' are far not
perfect.
 
Thanks in advance,
 
Maxim Maletsky - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Webmaster, J-Door.com / J@pan Inc.
LINC Media, Inc.
TEL: 03-3499-2175 x 1271
FAX: 03-3499-3109

http://www.j-door.com <http://www.j-door.com/> 
http://www.japaninc.net <http://www.japaninc.net/> 
http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/> 


 

Reply via email to