Re: -- table name prefix in result set after join --

From: Date: Sun, 24 Nov 2002 02:13:20 +0000
Subject: Re: -- table name prefix in result set after join --
Groups: php.db 
Request: Send a blank email to php-db+get-23619@lists.php.net to get a copy of this message
SELECT tblA.col1 as 'tblA.col1', tblB.col2 as 'tblB.col2', tblB.col3 as 'tblB.col3' FROM tblA, tblB
Is there a way in SQL to have the column names prefixed by the table name in a result set after a join? Table A has column col1 and table B has columns col2 and col3 After the join I want the result set to have columns named
A.col1    B.col2     B.col3
Such that I can tell from which table each column came from. Is this possible? Matt Friedman


« previous php.db (#23619) next »