MySQL中遇到的问题以及解决方法(一)出现负值


SELECT
    p.PatientID ,p.SBP, p.SBP2,p.SBP-p.SBP2
FROM
    ppg_data AS p 
    where p.SBP2 is not null 
    and p.SBP is not null

更改为

SELECT

p.PatientID ,p.SBP, p.SBP2,cast(p.SBP as signed)-cast(p.SBP2 as signed) FROM ppg_data AS p where p.SBP2 is not null and p.SBP is not null

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM