STARTS_WITH()
function determines whether the first argument starts with a specified string in the second argument or not.
first_argument
: the specified argument, which will be the search reference. It can be a string or a column name.second_argument
: the specified argument, which will have the search keywords.STRING
, and the return type is BOOL
, shown as true
or false
.
Special case:
NULL
for the NULL
record.true
(including the NULL
record) if the second_argument
is not specified.STARTS_WITH()
function using columntrue
to the pet with a pet starting with the letter J. Otherwise, false
.
STARTS_WITH()
function with no specified argumentNULL
value in the breed column.
STARTS_WITH
function but with no specified second_argument:
STARTS_WITH
will return true to all records (even the null
one):