Table of ContentsPreviousNext

Database Migration


Assignment Statements

Assignment statements are used to assign values to variables. Different databases support various variants of assignment statements.

TABLE 18. Various variants of assign statements
Databases
Syntax
Description
Microsoft SQL Server

SELECT @local_variable = expression { ,@local_variable = expression }

SET @local_variable = expression

Sets the specified local variable, previously created with the DECLARE @local_variable statement, to the given value.
Expression is any valid expression including a scalar subquery.
Oracle

local_variable := expression

 

Assignment operator assigns a value to a variable.
Expression is any valid expression. You cannot specify a subquery in the assignment operator.


Ispirer Systems
http://www.ispirer.com
ispirer@ispirer.com
Table of ContentsPreviousNext