The SQLite typeof()
function allows you to determine the data type of an expression.
An expression can be one of the following data types:
- null
- integer
- real
- text
- blob
The SQLite typeof()
function allows you to determine the data type of an expression.
An expression can be one of the following data types:
The SQLite randomblob()
function returns a blob containing pseudo-random bytes.
The number of bytes is determined by its argument. If its argument is less than 1 then a 1-byte random blob is returned.
Continue readingThe 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.
Continue readingIn SQLite, you can use the unicode()
function to return the unicode code point for a given character.
The way it works is that it returns the unicode code point for the first character of the string that you provide.
Continue readingThis page contains a list of aggregate functions that are available in SQLite by default.
Continue readingSQLite has a group_concat()
function that allows you to concatenate multiple results returned for a column into one.
This is sometimes referred to as “string aggregation”.
For example, when querying a database, instead of having each column’s value output in a new row, you can use group_concat()
to have them output as a comma separated list.
The SQLite substr()
function allows you to return a substring from a string, based on a given starting location within the string.
It requires two arguments, and accepts a third optional argument.
Continue readingIn SQLite, the round()
function allows you to round numbers up or down to a given decimal place.
It returns a floating-point value from the first argument, with the number of decimal places that you specify in the (optional) second argument.
If you don’t provide the second argument, it’s assumed to be 0.
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 reading