Return type of SIGN is float.
Examples of SIGN Function :
Example 1 : Use of SIGN function in select clause
SELECT SIGN(-20)
Output
-1
Above example returns sign of specified number with digit 1.
Example 2 : Use of SIGN function to display field value of table in a select clause
SELECT ProductName, SIGN(UnitPrice) AS Sign
FROM Invoices
Output
ContactName Sign
Maria Anders 1.00
Ana Trujillo 1.00
Antonio Moreno 1.00
Thomas Hardy 1.00
Christina Berglund 1.00
Hanna Moos 1.00
Above example displays sign of UnitPrice field of invoices table.
Example 3 : Use of SIGN function in where clause
SELECT ProductName, UnitPrice
FROM Invoices
WHERE SIGN(UnitPrice) = '-1'
Above example returns all products having negative unitprice from invoices table.