MudGuard: sortierung über zwei Tabellen, nur wenn in einer vorhanden

Beitrag lesen

Hi,

SELECT a.* FROM table1 a
LEFT JOIN table2 AS b ON  b.id = a.id
ORDER BY b.id=NULL, b.id, a.id DESC

müßte das nicht b.id IS NULL sein? ein = NULL liefert doch immer false …

cu,
Andreas a/k/a MudGuard