NULLIF FUNCTION:


Compares two values and does the following:

Returns null if both values are the same.
Returns the first value if both values are different.

SQL Server:
Select NULLIF(FIELD1, FIELD2) AS FIELD3 FROM TABLE;

Oracle:
Select NULLIF(FIELD1, FIELD2) AS FIELD3 FROM TABLE;

This free website was made using Yola.

No HTML skills required. Build your website in minutes.

Go to www.yola.com and sign up today!

Make a free website with Yola