VistaDB 6
VistaDB / Developer's Guide / SQL Reference / Control of Flow Statements / SET @VAR
In This Topic
SET @VAR
In This Topic

Set is used to assign a value to a previously declared variable.

You must first declare the variable with a DECLARE statement.

SET @variable_name = value_type;

Don't forget to end your line with a semicolon

Example

Declare Example
Copy Code
DECLARE @myval decimal( 5,2 );
SET @myval = 155.55;
SELECT @myval;

RETURNS: 155.55
See Also