Re: Preferring rows between to relational tables
Posted by: Roland Bouman
Date: March 16, 2006 09:54AM

this is builtin:

COALESCE()

coalesce returns the first not-null argument.

http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html

you might want to check out

http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html

too.

(edit: just one thing: you really cannot use:

something = NULL

or

something != NULL

if you want to check for nulls, do:

something IS NULL
or
something IS NOT NULL
or even
NOT something IS NULL

that's because NULL is not really a value, it's a marker that sais: hey, this value here is undefined. Compared to whatever ohther value, *even null itself* is never true.

)



Edited 1 time(s). Last edit at 03/16/2006 09:57AM by Roland Bouman.

Options: ReplyQuote


Subject
Written By
Posted
Re: Preferring rows between to relational tables
March 16, 2006 09:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.