Pervasive logo

Prev SQL Engine Reference Next

SELECT (with into)


The SELECT (with INTO) statement allows you to select column values from a specified table to insert into variable names within stored procedures.

Syntax

SELECT [ ALL | DISTINCT ] select-list INTO variable-name [ , variable-name ]... 
  FROM table-reference [ , table-reference ]... [ WHERE search-condition ] 
  [ GROUP BY expression [ , expression ]...[ HAVING search-condition ] ] 

Remarks

The SELECT with the INTO clause is only allowed within stored procedures.

Examples

The following example assigns into variables :x, :y the values of first_name an last_name in the Person table where first name is Bill.

SELECT  first_name, last_name INTO :x, :y from person where first_name = 'Bill' 

See Also

CREATE PROCEDURE


Prev
SAVEPOINT
Contents
Up
Check for Revisions
Next
SELECT