* (Multiply) (U-SQL)
Updated: March 27, 2017
Multiplies two expressions (an arithmetic multiplication operator).
| Syntax |
|---|
Multiply_Operator :=
expression '*' expression.
|
Semantics of Syntax Elements
expression
One of the Numeric Types.
Return Type
Returns the data type of the argument with the higher precedence.
Examples
- The examples can be executed in Visual Studio with the Azure Data Lake Tools plug-in.
- The scripts can be executed locally. An Azure subscription and Azure Data Lake Analytics account is not needed when executed locally.
Multiply with Numeric Types
@data =
SELECT * FROM
( VALUES
((int)38)
) AS T(aNumber);
DECLARE @val int = 5;
@result =
SELECT 38 * 5 AS Int1,
aNumber * 5 AS Int2,
aNumber * @val AS Int3,
aNumber * (int?)null AS intNull,
(aNumber * (double)12345).GetType().Name AS intAndDouble,
(aNumber * (long)12345).GetType().Name AS intAndLong
FROM @data;
OUTPUT @result
TO "/ReferenceGuide/Operators/Arithmetic/Multiply1.txt"
USING Outputters.Csv();
See Also
Community Additions
ADD
Show: