Informix可以工作,在Oracle中如何做到这一点?
IF (uzel NOT IN (SELECT a.uzel FROM user_setup.menu a WHERE a.vetka <> a.uzel
AND a.vetka IN (SELECT vetka FROM user_setup.param_menu)))
THEN
--;
END IF;
最佳答案
试试这个:
DECLARE
temp NUMBER;
v_uzel user_setup.menu.uzel%TYPE;
BEGIN
SELECT COUNT(*)
INTO temp
FROM dual
WHERE EXISTS (SELECT A.uzel
FROM user_setup.menu A
WHERE A.vetka <> A.uzel
AND A.uzel = v_uzel
AND A.vetka IN (SELECT vetka FROM user_setup.param_menu));
IF temp < 1 THEN
-- code here
END IF;
END;
关于sql - IF语句且未处于选择状态,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33295335/