SELECT
CASE
WHEN(SELECT COUNT(*) FROM COMMENT C WHERE C.ID=C.PID)>0
THEN 1
ELSE 2
END
AS "是否回复"
FROM COMMENT COM
09-11
09-11
SELECT
CASE
WHEN(SELECT COUNT(*) FROM COMMENT C WHERE C.ID=C.PID)>0
THEN 1
ELSE 2
END
AS "是否回复"
FROM COMMENT COM