Navigation:  NexusDB Guide > SQL Reference > SQL Statements > Control Statements >

SET statement

Previous pageReturn to chapter overviewNext page

NexusDB V3 Manual

Assignment statement

button_main button_prev button_next

NexusDB Manual V3 > SQL Reference > SQL Statements > Control Statements

Assign a value to an assignment target.

 

Syntax

 

<assignment statement> ::=

<assignment target> ::= <target specification>

 

<assignment source> ::=

 

Usage

 

The SET statement is used to assign values to assignment targets such as SQL variables, SQL parameters and columns of a transition table.

 

 

Notes

 

§

The data types of the assignment target and the assignment source shall be compatible.

 

 

Examples

 

1)

The following example assigns a value to the name SQL variable:

 

      SET name = firstName || ' ' || lastName;

 

2)

The following example assigns a value to a column of the transition table pointed to by the NEW variable in the context of a trigger definition:

 

      SET NEW.lastUpdated = CURRENT_TIMESTAMP;

 

 


Conformance

 

SQL:2003 standard

-

SQL/PSM Feature P002-05 "Assignment statement"

 

© Nexus Database Systems Pty Ltd.

nexus_logo