SQL函数:求select sign(?

SQL函数:求select sign(


UYOU
浏览 708回答 2
2回答

慕少森

Oracle/PLSQL: Sign Function在&nbsp;Oracle/PLSQL, sign 函数返回一个值来说明数字的符号,语法如下sign( number )If number < 0, then sign returns -1.If number = 0, then sign returns 0.If number > 0, then sign returns 1.For example:sign(-23) would return -1sign(-0.001) would return -1sign(0) would return 0sign(0.001) would return 1sign(23) would return 1sign(23.601) would return 1

翻翻过去那场雪

sign 取得是数据的 符号,当数据为0的时候 返回结果为0。如:select sign(1-2) from dual; 结果 -1select sign (-2) from dual; 结果 -1select sign(-0) from dual; 结果 0
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Ruby