-
Notifications
You must be signed in to change notification settings - Fork 664
Declare
Andrey Gershun edited this page May 27, 2015
·
4 revisions
Syntax:
DECLARE variable type [= expression]
AlaSQL allows to create local variables with @
prefix:
var res = alasql('DECLARE @one char(3) = "abcdef"; SELECT VALUE @one')[1];
// returns "abcdef"
Try this example in jsFiddle.
You can assign value immediatly to the declared variable:
DECLARE @var1 type1 = expr1, @var2 type2;
See also: SET
© 2014-2024, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo