简介:

sign(exp)函数根据exp是零、正数还是负数,分别返回0、1、-1

---格式
select sin(exp) from db_table 
---例子
select sign(sale-6000) from db_table
select username ,dept, sale, decode(sign(sale-6000),-1,'薪水<6000',0,'薪水=6000',1,'薪水>6000') from db_table

 

相关文章:

  • 2022-12-23
  • 2022-03-10
  • 2021-05-17
  • 2022-12-23
  • 2021-12-11
  • 2022-01-26
猜你喜欢
  • 2021-05-25
  • 2021-07-11
  • 2021-06-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
相关资源
相似解决方案