我想在 select 中使用 equals 可以吗?
选择示例
DECLARE @NAME_SURNAME varchar(200);
SELECT
(CASE WHEN (PLP.NAME +' '+ PLP.SURNAME) != @NAME_SURNAME THEN (SET @NAME_SURNAME = (PLP.NAME +' '+ PLP.SURNAME)) END) AS 'LP.',
问题:
(SET @NAME_SURNAME = (PLP.NAME +' '+ PLP.SURNAME))