May 2019
Beginner to intermediate
548 pages
12h 39m
English
The WHERE condition is one of the most commonly used additions to the SELECT query. We don't require all the data from the table too often, but, quite often, we do need to get some fields from the table where they have a number of values. In this case, the WHERE condition in particular can be used.
The most basic use of WHERE is when we choose a field with only one value. For example, we want to select data from the sflight table, where carrid has a value of LH.
Our SELECT looks like this:
SELECT carrid connid FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight WHERE carrid = 'LH'.
The result of this is as follows:
As you can see, SELECT only returns data when carrid has an LH value.
If we want to select data when using ...
Read now
Unlock full access