sqlserver查詢最接近的記錄

weixin_33912246發表於2018-01-23

select top 1 SEX,ACTIVE ,HEIGHT,WEIGHT,HOT,CARBON,PROTEIN,FAT,sodium from standard where sex='0'and active= 'D' order by abs(AGE-1), abs(HEIGHT-160), abs(WEIGHT-52)

相關文章