In SQLite, the char() function returns a string based on the unicode code points provided as arguments.
You can provide one or more arguments, each of which is a unicode code point. The function then returns a string based on those code points.
Database Management Systems
SQLite doesn’t have a concat() function like many other database management systems, such as SQL Server’s concat() and MySQL’s concat().
However, that doesn’t mean you can’t concatenate two strings in SQLite.
SQLite has a concatenation operator (||) that you can use to concatenate two strings.
In SQLite, you can use the instr() function to return the position of a given character within a string.
The function only returns the position of the first occurrence of the character (if any).
If the character isn’t found, then it returns 0.
If either of the arguments are NULL, then it returns NULL.
The SQLite quote() function allows you to escape a string so that it’s suitable for inclusion in an SQL statement.
Strings are surrounded by single-quotes with escapes on interior quotes.
BLOBs are encoded as hexadecimal literals.
Note that strings with embedded NUL characters cannot be represented as string literals in SQL. If you include strings with embedded NUL characters, the returned string literal is truncated prior to the first NUL.
In SQLite, you can use the random() function to generate a pseudo-random number.
This is great, but the value returned is between -9223372036854775808 and +9223372036854775807.
What if you need a random number between 0 and 10? Or say, 1 and 100?
Fortunately you can do this by combining random() with abs() and the modulo operator.
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.