Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » UltraLite - 数据库管理和参考 » UltraLite SQL 参考 » UltraLite SQL 函数 » SQL 函数 (P-Z)

 

SIGN 函数 [Numeric]

返回一个数字的符号。

语法
SIGN( numeric-expression )
参数
  • numeric-expression   要返回其符号的数字。

返回值

SMALL INT

注释

对于负数,SIGN 函数返回 -1。

对于零,SIGN 函数返回 0。

对于正数,SIGN 函数返回 1。

标准和兼容性
  • SQL/2003   服务商扩充。

示例

以下语句返回值 -1

SELECT SIGN( -550 );