我有以下@temp 表:
------------------------------------
|Condition_ID Operator Order |
| 1 == 1 |
| 2 <> 3 |
| 3 == 2 |
------------------------------------
我想实现一个 SELECT CASE,它将根据 Operator 输出特定消息
然而,这给我一个Incorrect syntax near the keyword 'PRINT'.
错误。
SELECT CASE
WHEN Operator LIKE '=='
THEN PRINT 'EQUALS'
WHEN Operator LIKE '<>'
THEN PRINT 'NOT EQUALS'
END AS Operator
FROM @temp
我究竟做错了什么?