Table of contents
Collapse the table of content
Expand the table of content

* (Multiply) (U-SQL)

Michael Rys|Last Updated: 5/15/2018
4 Contributors

Multiplies two expressions (an arithmetic multiplication operator).

Multiply_Operator :=                                                                                     
     expression '*' expression.

Semantics of Syntax Elements

Return Type

Returns the data type of the argument with the higher precedence.


  • 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 = 
        ( VALUES
        ) 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

© 2018 Microsoft