Hi! It depends, what language use you to include SQL commands. I use Java and if I use scrollable result set I can resolv the problem inside a class.
Best regards On Mon, 6 Oct 2003 10:00:37 +0200, Director General: NEFACOMP wrote > Hi Group, > > I want to use a UNION in order to SELECT columns from several tables > but I wish MySQL could use the following syntax: > > SELECT {several fields} FROM (Table1 UNION Table2 UNION Table3 ..... > ) WHERE condition > > Currently I think MySQL only supports the following: > > (SELECT {several fields} FROM Table1 WHERE condition) UNION > (SELECT {several fields} FROM Table2 WHERE condition) UNION > (SELECT {several fields} FROM Table3 WHERE condition) UNION > (SELECT {several fields} FROM Table4 WHERE condition) > > If the string {several fields} contains like 50 columns and the > tables are for instance 100, you understand how long the query sent > to the server will be (of course it works but ....) For those who > did Mathematics, you may be remembering that it is easier to write > 10 * (20 + 30 + 40 + 50 + 60 + 70 ) than writing 10 * 20 + 10 * 30 + > 10 * 40 + 10 * 50 + 10 * 60 + 10 * 70 > > Thanks, > __________________________________ > NZEYIMANA Emery Fabrice > NEFA Computing Services, Inc. > P.O. Box 5078 Kigali > Office Phone: +250-51 11 06 > Office Fax: +250-50 15 19 > Mobile: +250-08517768 > Email: [EMAIL PROTECTED] > http://www.nefacomp.net/ Laszlo Illyes Library-informatics Sapientia University (Csikszereda) Miercurea-Ciuc Tel:+40266317310 Fax:+40266317310/+40266371121 Mobil:+40740055706 E-mail: [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]