The UNION operator of Pig Latin is utilized to combine the content of two relations. To perform UNION operation on two relations, their columns and areas should be identical.
grunt> Relation_name3 = UNION Relation_name1, Relation_name2;
1 aaa 74385738 delhi 21
4 ggg 74824727 goa 21
1 aaa 74385738 delhi 21
2 bbb 76349948 mumbai 22
4 ggg 74824727 goa 21
5 hhh 74843847 pune 22
7 lll 76485838 goa 26
grunt> student = UNION student1, student2;
1 aaa 74385738 delhi 21
2 bbb 76349948 mumbai 22
3 ddd 87493589 pune 23
4 ggg 74824727 goa 21
5 hhh 74843847 pune 22
6 uuu 76347242 delhi 24
7 lll 76485838 goa 26