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