Assign a null value to a variable.
1 null
<null
name='name'
type='type'
>
<var | expr /> ?
</null>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aname | string | Name of the variable. | |||
Atype | string | Type of variable. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Evar | expr | Entry variables of the SQL Object. |
Returns | |
---|---|
Type | Description |
Null | Variable with null value. |
Exceptions
only one variable admited
Only requires a variable as argument
incorrect null type
Incorrect type.
Remarks
The attribute name and the argument var | expr are excluding.
Through the attribute name of the label <null>, the variable to which you want tot assign the null value is indicated.
Also two operators NULL are available for expressions of conditional sentences: <isnull> and <isnotnull>.
Example
Show variable with null value.
Copy
<xsql-script name='null_sample1'> <body> <null name='a' /> <println> The variable 'a' contains <a/> and is of type <variable.typeof><a/></variable.typeof> </println> </body> </xsql-script>
Returns:
Copy
The variable 'a' contains null and is of type null
Example
Show variable with null value.
Copy
<xsql-script name='null_sample2'> <body> <set name='a'><null /></set> <println> The variable 'a' contains <a/> and is of type <variable.typeof><a/></variable.typeof> </println> </body> </xsql-script>
Returns:
Copy
The variable 'a' contains null and is of type null
Example
Show variable without null value.
Copy
<xsql-script name='null_sample3'> <body> <set name='a' type='string'>hola</set> <println> The variable 'a' contains <a/> and is of type <variable.typeof><a/></variable.typeof> </println> </body> </xsql-script>
Returns:
Copy
The variable 'a' contains hello and is of type java.lang.String