The SQLite lower()
function allows you to convert a string to lowercase characters.
More precisely, it returns a copy of its argument, with all ASCII characters converted to lowercase.
Continue readingThe SQLite lower()
function allows you to convert a string to lowercase characters.
More precisely, it returns a copy of its argument, with all ASCII characters converted to lowercase.
Continue readingThe SQLite upper()
function allows you to convert a string to uppercase characters.
More precisely, it returns a copy of its argument, with all ASCII characters converted to uppercase.
Continue readingThe 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.
The SQLite random()
function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807.
A pseudo-random number is a number that appears to be random, but is not truely random. A pseudo-random number is not truely random because its value was generated by a known seed. However, a pseudo-random number will appear to be random if the user has no knowledge of the seed or algorithm that created it.
Therefore, pseudo-random numbers are often considered good enough for many applications.
Continue readingThe SQLite ifnull()
function allows you to replace NULL values with another value.
It takes two arguments, and it returns a copy of its first non-NULL argument, or NULL if both arguments are NULL.
The ifnull()
function is equivalent to coalesce()
with two arguments.
In SQLite, the coalesce()
function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL.
It’s similar to the ifnull()
function, except that coalesce()
accepts more than two arguments (ifnull()
only accepts two arguments).
The SQLite trim()
function trims whitespace or other characters from both sides of a string.
The function returns a copy of the string that you provide as an argument, with either whitespace, or other characters as specified, trimmed from both sides.
Continue readingIn SQLite, the rtrim()
function enables you to trim whitespace or other characters from the right part of a string.
It returns a copy of the string that you provide as an argument, with the right part trimmed of either whitespace, or other characters as specified.
Continue readingThe SQLite ltrim()
function trims whitespace or other characters from the left of a string.
More precisely, it returns a copy of the string that you provide as an argument, with the left part trimmed of either whitespace, or other characters that you specify.
Continue readingIf you’ve ever used the SQLite command line shell, you’re probably familiar with the default command line prompt. Actually, there are two prompts:
sqlite>
...>
If you don’t like these prompts, you can always change them with the .prompt
dot command.
This article provides a quick demonstration on how to change these prompts.
Continue reading