SAP Tutorials Blog

 

 


The following specifications can also be combined:


SELECT * ...: As outlined above, the * character defines all columns to be read from a data source (in the order specified there).

SELECT col1, col2, col3 ...: A comma-separated list of individual column names.

SELECT data_source~col1, data_source~col2, data_source~col3 ...: A comma-separated list of individual column names. Here, the name of the data source is explicitly specified and precedes the column name, separated by a tilde.

SELECT data_source~* ...: In this case, the name of the data source is followed by a tilde and the * character to specify all columns. Note that there are special conditions when using this variant.

SELECT col1 AS al1, col2 AS al2, col3 AS al3 ...:

Defining alias names for individual columns of the result set with AS.

Make sure that you use an alias name only once here. In the statement, the alias name can only be used after an ORDER BY clause.

As shown further down, in some cases (e. g. when using SQL expressions) the specification of an alias name is required. Setting an alias name for the data source is also possible (SELECT FROM dbtab AS alias_name ...). See the section on joins further down.


Serkan AKKAVAK

Computer Engineer BSc

SAP Department Manager

Contact : serkurumsal@yandex.com