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, 1103🔥, 0💬
Popular Posts:
What Privilege Is Needed for a User to Delete Rows from Tables in Another Schema in Oracle? For a us...
Where to find answers to frequently asked questions on Conditional Statements and Loops in SQL Serve...
How To Enter Unicode Character String Literals in SQL Server Transact-SQL? Unicode characters are mu...
What Is Oracle in Oracle? Oracle is a company. Oracle is also a database server, which manages data ...
What is dba.FYIcenter.com Website about? dba.FYIcenter.com is a Website for DBAs (database administr...