in Databases edited by
388 views
0 votes
0 votes

UNION, Intersect Operation in both, Relational Algebra and SQL automatically eliminates DUPLICATES. Does UNION, INTERSECT operation also by default SORTs the resultant tuples in SQL (OR) the resultant SET in Relational Algebra? If Yes, Does it also automatically sorts the result of UNION ALL &  INTERSECT ALL?

in Databases edited by
388 views

3 Comments

they are sort (by default), which tuple seems first in the table.

But not the values of any field.

i mean, in your table, you have

id  name

2 "A"

1 "C"

3 "B"

like that then the sort also in the tuple wise, but not on the attribute (either id or name) wise.

1
1
Yeah, I get that the tuples are sorted not the attributes. Can you please elaborate how tuples are sorted, I mean on what basis they get compared!
0
0

Table1 intersect Table2

then first row of Table1 compared all the rows of Table2 ... if it is matched then print in result.

0
0

Please log in or register to answer this question.

Related questions