【发布时间】:2021-08-31 04:30:46
【问题描述】:
我需要生成一列,在每一行中检查Bestand 是否小于、等于或大于Minbestand。如果是这样,名为Bestandsbewertung 的新列需要分别给出Mangel、Mindestbestand 或Überfluß。
SELECT IF(Bestand < Minbestand, 'Mangel', IF(Bestand = MinBestand, 'Mindestbestand', 'Überstand')) AS Bestandsbewertung, Teile.*
FROM Teile
我试过这段代码,但 HSQL 说它不知道 IF。
【问题讨论】: