Jump to content
Fórum Script Brasil
  • 0

Sql Semelhante


frnd
 Share

Question

estou tentando criar uma SQL semelhante a essa e estou tendo dificuldades..

SELECT * FROM egresso WHERE id IN (SELECT id FROM avaliacaointerno) AND egresso.id IN (SELECT id from permegresso);

tentei fazer essa...

SELECT t1.* FROM egresso t1 left inner join avaliacaointerno t2 on (t1.id <> t2.id) where t2.id is null mas não funciona...

como pode ser correto?

[]s

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

bom, acho que resolvi

SELECT t1. * FROM egresso t1

LEFT JOIN avaliacaointerno t2 ON t1.id = t2.id

LEFT JOIN permegresso t3 ON t1.id = t3.id

WHERE t2.id AND t3.id IS NOT NULL

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



  • Forum Statistics

    • Total Topics
      150.2k
    • Total Posts
      647.5k
×
×
  • Create New...