PHP 8.5.0 Alpha 2 available for testing

Voting

: max(six, two)?
(Example: nine)

The Note You're Voting On

gabi at gambita dot de
21 years ago
if you want to join two tables having both the same column (e.g. 'id') but you don't want to (or cannot) specify all the other fields in these two tables (like erabbott mentioned), you can use:

SELECT t1.*, t2.*, t1.id AS id1, t2.id AS id2
FROM table1 t1, table2 t2;

Note that this does _not_ work:

SELECT *,t1.id AS id1, t2.id AS id2
FROM table1 t1, table2 t2;

<< Back to user notes page

To Top