Re: [Fwd: Result of UNION depends on order of fields in SELECT]

Alexander Keremidarski <[email protected]>
Newsgroups gmane.comp.db.mysql.bugs
Organization MySQL AB
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

Vincenzo Ciaschini wrote:
<cut>

> But apparently I didn't understand correctly what UNION was supposed to
> do...


It is as simple as that UNION combines *results* of two queries.

Just think this way.

Columns in result are *not* the same as columns in underlying tables. This is
one of most important concepts of Realtional Database Model.

Queries do not just retrieve data from database. Instead by Query you generate
*new* data based on existing.

Always keep thinking this way and you will avoid a loty of common confusions.

Database != Storage only :)

> Bye,
>    Vincenzo

Best regards

- --
 Are you MySQL certified? -> http://www.mysql.com/certification
 For technical support contracts, visit https://order.mysql.com/?ref=msal
    __  ___     ___ ____  __
   /  |/  /_ __/ __/ __ \/ /    Mr. Alexander Keremidarski <[email protected]>
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-Time Developer
 /_/  /_/\_, /___/\___\_\___/   Sofia, Bulgaria
         <___/  www.mysql.com


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/u59ueehWBZ4HcYkRAjCOAJ4voM4PoGuHjmGlb24DdtR+oxM6FwCfR+MJ
64TOBPGr3ucG9giTyVlC7xA=
=pQ76
-----END PGP SIGNATURE-----


-- 
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.