SQL Commands
SQL Commands
The objective of this lab session is to learn Set operations Union, intersection, Except
and Aggregate Functions
Create this table Bikes and insert 5 Create this table Cars and insert 5
records records
Task 1
1. Find union of car and owner_name
from both tables
Task 2
1. Show only 1st row of table bikes
Task 3
1. Show the Count of total numbers of
records in table cars
Task 4
1. Show maximum year in bikes
owner_id int );
owner_id int );
select colour from bikes union all select colour from cars
select colour from bikes union select colour from cars
Max Obtained
Task Comments(if any)
Marks Marks
1. 10
2. 10
3. 10
4. 10
Total 40 Signature
Note : Attempt all tasks and get them checked by your Lab. Instructor