docs.intersystems.com
InterSystems IRIS Data Platform 2019.2  /  InterSystems SQL Reference

InterSystems SQL Reference
- (Negative)
Next section
InterSystems: The power behind what matters   
Search:  


A unary operator that returns an expression as a negative, numeric value.
Synopsis
-expression
Arguments
expression A numeric expression.
Description
Unary operators perform an operation on only one expression of any of the data types of the numeric data type category.
– (Negative) is an InterSystems SQL extension.
Examples
The following example returns three numeric fields: the Age column from Sample.Person; the – (Negative) value of the average of Age; and the Age minus the average age:
SELECT Age,
       -(AVG(age)) AS NegAvg,
       Age-AVG(Age) AS AgeRelAvg
FROM Sample.Person
See Also
+ (Positive)


Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-08-22 06:48:58