SELECT (SELECT id from data WHERE id=1), (SELECT id from data WHERE id=4);

This willl return you the 2 columns in one row.

Otherwise, if you're looking to return multiple queries into one
result set, then UNION is what you're looking for.  ie (select id from
data) UNION (select id from data).


On Tue, 15 Mar 2005 17:43:29 -0600, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi there!
> 
> I need to do this:
> From this table
> +--------------+
> |id|Data       |
> |--|-----------|
> | 1|Something 1|
> | 2|Something 2|
> | 3|Something 3|
> | 4|Something 4|
> | 5|Something 5|
> | 6|Something 6|
> +--------------+
> 
> Get this query
> +-----------------------------+
> |id|Data       |id|Data       |
> |--|-----------|--|-----------|
> | 1|Something 1| 4|Something 4|
> | 2|Something 2| 5|Something 5|
> | 3|Something 3| 6|Something 6|
> +-----------------------------+
> 
> Any idea?
> TIA
> 
> ----------------------------------------------------------------
> Servicio de Correo Unidad Central - CETI - http://www.ceti.mx
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to