GATE CSE
First time here? Checkout the FAQ!
x
0 votes
55 views

How many rows will be there in the output of the following query?

asked in Databases by Boss (5.3k points) 4 56 140 | 55 views

1 Answer

+1 vote
The second query always returns 0.

Thus, the table returned by second query consists of 1 tuple.

 

Now, exists( table containing single tuple)= true for every employee of 1st relation.

 

Thus, bove query will return all the tuples of the 1st relation.
answered by Veteran (18k points) 7 20 76

So it means that whenever we have an internal query consisting of count() then in case of exists we will always get all tuples because count always return an integer  value.

plz varify?

Yes, I suppose that count() will always return an integer. But, today I will execute the query and let you know the actual outcome.


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
Top Users Oct 2017
  1. Arjun

    23684 Points

  2. Bikram

    17288 Points

  3. Habibkhan

    9086 Points

  4. srestha

    6460 Points

  5. Debashish Deka

    5478 Points

  6. jothee

    5148 Points

  7. Sachin Mittal 1

    4910 Points

  8. joshi_nitish

    4492 Points

  9. sushmita

    4068 Points

  10. Rishi yadav

    3998 Points


Recent Badges

Photogenic arvin
Notable Question Chandramani Adil
Popular Question shaff
Popular Question makhdoom ghaya
Good Answer Arjun
Good Comment sudsho
Popular Question jothee
100 Club NEELU PANDEY
Good Answer Mehak Sharma 1
Good Question jothee
27,421 questions
35,271 answers
84,571 comments
33,506 users