Awesome q2a theme
0 votes
34 views

Coaching (cname, city)

Travel (name, city)

Select T1.name from Travel T1 where Not Exist (Select M.city FROM Coaching M where M.cname = “madeeasy”  EXCEPT  Select T2.city from Travel T2 where T1.name = T2.name)

The above query returns the name of the person – 

  1. who have not travelled in any city where madeeasy is located.
  2. who have travelled in all city where madeeasy is located.
  3. who have travelled in at least one city where madeeasy is located.
  4. who have not travelled in all city where madeeasy is located.

N.B – This is a 1 mark question.

in Databases by (37 points) | 34 views
0

Ans given as B ?

0
yes, but how much time did you take & how to do it fast ???
0

see the not exist , when it will be true when the given part which is inside bracket is empty. Now try to make the inside  part empty and you will find out that it will be empty only when a person has travelled all the cities where Made easy is located.

Please log in or register to answer this question.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Jun 2020
  1. ummokkate

    8 Points

  2. nehaPal13

    7 Points

  3. Taraka

    6 Points

  4. pratyush12

    6 Points

  5. Radheram

    6 Points

  6. vps123

    4 Points

  7. reboot

    2 Points

  8. Chinmay Agnihotri

    2 Points

  9. Shubham Aggarwal

    2 Points

  10. Musa

    1 Points

7,410 questions
1,744 answers
10,718 comments
90,372 users