Difference Between NullIf() and IfNull() in SQLite

SQLite has a function called nullif() and another function called ifnull(), each of which serve a different purpose.

  • nullif() allows you to treat certain values as NULL. You can think of it as “return NULL if …”.
  • ifnull() allows you to replace NULL values with another value. You can think of it as “if NULL, then …”.

So they basically do the opposite of each other. One replaces NULL values with another value, and the other replaces another value with NULL.

Read more

How Replace() Works in SQLite

The SQLite replace() function enables us to replace one string (or part of a string) with another string.

The way it works is that you provide three arguments; the string that contains the substring to replace, the substring within that string to replace, and the string to replace it with.

Read more

What is SQLite?

SQLite is a widely-used lightweight, embedded relational database management system (RDBMS).

SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. SQLite is largely SQL standards compliant, and it is fully ACID compliant.

Read more