Comparing dates in SQL Server works the same way as comparing numbers. The same operators apply, the logic is the same, and the results behave exactly as you’d expect (but with a couple of gotchas worth knowing about).
comparison functions
NULLIF() Function in Oracle
In Oracle Database, the NULLIF() function compares two expressions, and returns null if both expressions are equal. If they are not equal, then the function returns the first expression.
NVL() Function in Oracle
In Oracle Database, the NVL() function allows us to replace null values with another value.
COALESCE() Function in Oracle
In Oracle Database, the COALESCE() function returns the first non-null expression the expression list.
GREATEST() Function in Oracle
In Oracle Database, the GREATEST() function returns the greatest of a list of one or more expressions.
LEAST() Function in Oracle
In Oracle Database, the LEAST() function returns the least of a list of one or more expressions.
How LEAST() Works in MariaDB
In MariaDB, LEAST() is a built-in function that returns the least (i.e. smallest/minimum-valued) argument from its list of arguments.
To get the greatest value, use GREATEST().
How SQLite Nullif() Works
The SQLite nullif() function is a handy function that allows you to treat certain values as NULL when required.
It’s not to be confused with the ifnull() function, which does the opposite – enables you to treat NULL values as something else.
The nullif() function accepts two arguments, and returns its first argument if the arguments are different and NULL if the arguments are the same.