RE: [PHP-DB] union/select statement number of columns

2007-10-19 Thread Bastien Koert
Unions required that the the queries have the same number of columns and the same data type for each column bastien To: php-db@lists.php.net Date: Fri, 19 Oct 2007 09:24:38 -0600 From: [EMAIL PROTECTED] Subject: [PHP-DB] union/select statement number of columns Hello all, I receive an

Re: [PHP-DB] union/select statement number of columns

2007-10-19 Thread David Mitchell
For starters, here's a simple example using Oracle: select tname, tabtype from tab union select table_name, null from user_tables; I replaced NULL in the second query for the missing column. In a different observation, it would be better, I think, to name the individual columns rather than

RE: [PHP-DB] union/select statement number of columns

2007-10-19 Thread Bastien Koert
Unions required that the the queries have the same number of columns and the same data type for each column bastien To: php-db@lists.php.net Date: Fri, 19 Oct 2007 09:24:38 -0600 From: [EMAIL PROTECTED] Subject: [PHP-DB] union/select statement number of columns Hello all, I receive an