Collections:
NULLIF() - NULL on Equal Values
How to generate NULL with equal values using the NULLIF() function?
✍: FYIcenter.com
NULLIF(val1, val2) is a MySQL built-in function that
returns NULL if the first argument equals the second,
the first argument otherwise.
For example:
SELECT NULLIF('yes', 'yes'), NULLIF('yes', 'no');
-- +----------------------+---------------------+
-- | NULLIF('yes', 'yes') | NULLIF('yes', 'no') |
-- +----------------------+---------------------+
-- | NULL | yes |
-- +----------------------+---------------------+
Reference information of the NULLIF() function:
NULLIF(val1, val2): val Returns NULL if the first argument equals the second, the first argument otherwise. Arguments, return value and availability: val1, val2: Required. The values to be selected from. val: Return value. NULL if val1=val2, val1 otherwise. Available since MySQL 4.0.
⇒ RELEASE_ALL_LOCKS() - Release All Locks
⇐ NAME_CONST() - PS Thread ID of Given Connect
2023-12-19, 1476🔥, 0💬
Popular Posts:
What Is Transport Network Substrate (TNS) in Oracle? TNS, Transport Network Substrate, is a foundati...
How To Find Out What Privileges a User Currently Has in Oracle? Privileges granted to users are list...
How To Generate CREATE VIEW Script on an Existing View in SQL Server? If you want to know how an exi...
How to change the data type of an existing column with "ALTER TABLE" statements in SQL Server? Somet...
What To Do If the StartDB.bat Failed to Start the XE Instance in Oracle? If StartDB.bat failed to st...