Entering content frame

This graphic is explained in the accompanying text SELECT INTO Statement Locate the document in its SAP Library structure

The SELECT INTO statement can be used only in the Structure linkSingle Row Queryin Structure linkSQLJ. It is a special query that produces a result set with at most one row of data. The result set is simultaneously being fetched into host variables.

Note

A SELECT INTO statement may not contain an ORDER BY clause or unions.

Syntax

This graphic is explained in the accompanying text

<select into statement> ::=
              SELECT ( DISTINCT | ALL )? <select list>
                  
INTO <host expression> ( ',' <host expression> )*
                  <from clause><where clause> )?.

Example

This graphic is explained in the accompanying text

SELECT employee_name INTO ?
               FROM employees WHERE epmloyee_id = 999

The SELECT INTO Statement.  Here, the name of the employee with the employee_id 999is fetched directly into a host variable.

See

Select List, FROM Clause, WHERE Clause, Dynamic Parameter Specification, Structure linkSQLJ, Structure linkSingle Row Query

Leaving content frame