In the last episode (Nov 24), Steffan A. Cline said:
> Is there anything I am missing that will allow me to return a default row if
> the sought after row is not found?
>
> For example :
>
> Select * from table1 where column1=1234
>
> If 1234 is not found, row1 would be returned instead.
> If 1234 is found then that is the row returned.
SELECT * FROM (
SELECT * FROM table1 WHERE column1=1234
UNION
SELECT * FROM table1 WHERE column1=1 /* or whatever uniquely identifies row1 */
) t LIMIT 1;
--
Dan Nelson
dnelson@stripped
| Thread |
|---|
| • Default result | Steffan A. Cline | 25 Nov |
| • Re: Default result | Dan Nelson | 25 Nov |