|
The LIKE condition allows you to use wildcards in the WHERE clause
of an SQL statement. This allows pattern matching.
The patterns
that you can choose from are:
NOT LIKE
examines whether the given section is not present in the string.
The arithmetical standard operators for addition (+), subtraction (-), multiplication (*) and division (/) can all be used for numerical constant or for attributes with a numerical domain. This allows attributes in a request to be calculated together.
In the above example the result is a relation with three attributes.
The third attribute is named "Usury" since "Price/Size"
is not a good name and stands for the price per unit.
We define that if it lies over 15, it is overpriced ("Usury").
Arithmetical operators can be used in the SELECT part of a request or in the conditions.
AS
:
<Attribute/Relation> AS <new name>
(The key word AS
can be omitted). This can be used to give a calculated value a meaningful
name (see example), or to make SQL requests easier to read.