In SQL, the LIKE
operator allows you to do pattern matching. It determines whether a specific character string matches a specified pattern.
A pattern can include regular characters and wildcard characters.
Continue readingIn SQL, the LIKE
operator allows you to do pattern matching. It determines whether a specific character string matches a specified pattern.
A pattern can include regular characters and wildcard characters.
Continue readingIn SQL, an operator is a special character or keyword specifying an action that is performed on one or more expressions.
SQL operators are an integral part of SQL, and they enable us to write queries that return relevant results.
In this article, I present 12 of the most commonly used SQL operators when writing SQL queries.
Continue readingBelow is a list of T-SQL comparison operators that you can use in SQL Server.
Continue readingComparison operators are an important part of most programming languages.
Comparison operators are used to compare two expressions. The result is either true
or false
. It could also be unknown. This could also be represented by either 1
, 0
, or NULL
, depending on the language. These are typically known as “Boolean expressions”.
When used with databases, comparison operators can be used inside your SQL queries to filter data to a certain criteria.
Continue readingIn PostgreSQL, you can use the OVERLAPS
operator to test for overlapping time periods.
The function returns true when two time periods (defined by their endpoints) overlap, and false when they do not overlap.
Continue readingThis article presents two ways to insert a new line character into a string in SQLite.
This means you can have some text on one line, more text on another line, etc, rather than it being one long line.
Continue readingSQLite 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.
By default, the SQLite LIKE
operator is case-insensitive for ASCII characters. This means it will match uppercase and lowercase characters, regardless of which case you use in your pattern.
However, there is a technique you can use to make it case-sensitive.
Continue readingIn SQLite, you can use the LIKE
operator in your queries to do a pattern matching comparison.
For example, you can add it to your WHERE
clause in order to return only rows that match a given pattern.
However, adding it to the WHERE
clause isn’t the only way you can use the LIKE
operator. You can also use it to return a boolean value.
MySQL has a number of functions and operators that allow us to perform operations using regular expressions (regex). This article presents two operators and one function that enable us to find out if a string matches a regular expression specified by a given pattern.
These regex functions and operators are:
These are all basically equivalent, as the operators (the second two) are both synonyms of the function (the first one). In any case, you can see examples of all three in action below.