Syntax-exists

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc
  

Poston Wed, 12 Mar 2008 10:38 am

How is the syntax for using the select with the exist between tables ...
mariogus
Location: Porto Alegre - RS

Poston Wed, 12 Mar 2008 11:04 am

Brother, I have this example below:
Code: Select all
-- Exemplo NOT EXISTS
-- Trazer todos os empregados
-- que não sejam do departamento = 10
SELECT e.*
FROM emp e
WHERE NOT EXISTS (SELECT 1
                    FROM dept d
                   WHERE d.deptno = e.deptno
                     AND d.deptno = 10);
is only to illustrate the NOT EXISTS, because this query could have been done more simply, if it weren't for illustration, beleza?

qualquer thing, says ai.
Trevisolli
Location: Araraquara - SP

Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP



Return to SQL

Who is online

Users browsing this forum: No registered users and 3 guests