|
![]() |
![]() |
![]() |
Conditions are usually made of an attribute, a value and an operator that forms the condition (eg. Name="John"). But the values themselves don't have to be constants, they can be the result of another sub-query. We then talk about nested queries. Using the IN-operator nested queries can be as deep as necessary.
SQL supports different comparison operators like ==,<,>,<>,<=,>=,between
etc. If an operator is used to compare an attribute with a constant, we talk about restriction. If the
operator is used to compare two attributes, then we talk about a join. With
joins, data from different relations can be compared and combined. Of course
only attributes with the same domain (value range) can be compared.
If in the SELECT-clause a star (*) instead of an attribute list is used, then all attributes are displayed.
![]() |
![]() |
![]() |
![]() |