1,449 views
0 votes
0 votes

Given enroll table as follows:
image:MST2/5Qa.png
What is the number of tuples in the output of the following query?
Select Stud.Id FROM ENROLL WHERE grade = ‘A’
UNION ALL
Select Stud.Id FROM ENROLL WHERE grade = ‘B’;

in this table ,select operation will select distinct student id values or it can take same studentid wherever grade = A or B??

i.e

first select operation on A will select (1,2,3) or (1,2,1,3)  ??

1 Answer

0 votes
0 votes
Result will be six tuples from the above query.

Related questions

3 votes
3 votes
2 answers
1
iarnav asked Dec 6, 2017
1,305 views
Say we have two relations R (a,b,c) and S (b,d,e).Now, R has 200 tuples and S has 300 tuples. What will be Minimum number of tuples when we do R ⋈ S ( ⋈ = Natural Joi...
5 votes
5 votes
4 answers
2
learncp asked Sep 5, 2015
3,404 views
Why is the maximum number of tuples in full outer join equal to m*n, where m is the number of attributes in one relation and n is the attribute count in other ?Can someon...
0 votes
0 votes
1 answer
3
srestha asked Dec 16, 2017
1,556 views
Consider the relation schema:Student(roll no, name course no)Enroll(roll no, course no,course name)The number of tuples in the student and enroll table is 30 and 40 respe...
2 votes
2 votes
1 answer
4