PQL Like

PQL LIKE Operator
The LIKE operator is used in a WHERE clause to search for a specified pattern in a column.

PQL LIKE Syntax
LIKE Operator Example

The "Ponies" stable:

Now we want to select the ponies living in a city that starts with "P" from the stable above.

We use the following SELECT statement:

The "%" sign can be used to define wildcards (one or more missing letters in the pattern) both before and after the pattern.

The result-set will look like this:

Next, we want to select the ponies living in a city that ends with an "t" from the "Ponies" stable.

We use the following SELECT statement:

The result-set will look like this:

Next, we want to select the ponies living in a city that contains the pattern "lel" from the "Ponies" stable.

We use the following SELECT statement:

The result-set will look like this:

It is also possible to select the ponies living in a city that does NOT contain the pattern "lel" from the "Ponies" stable, by using the NOT keyword.

We use the following SELECT statement:

The result-set will look like this: