ABC fitness centre has computerized their Gym by keeping details of their Trainees in Trainer table and clients in Customer table which are as follows:
Table : Trainer
|
TId |
TName |
Activity |
Salary |
Dt_Appoint |
|
G101 |
Manish |
Kick Boxing |
18000 |
2020-10-12 |
|
G102 |
Sachin |
Core |
22000 |
2021-06-09 |
|
G103 |
Aahan |
Core |
25000 |
2020-05-30 |
|
G104 |
Aparna |
Zumba |
15000 |
2021-11-12 |
|
G105 |
Nitin |
Yoga |
20000 |
2022-02-15 |
Table : Customer
|
CId |
Cust_Name |
Gender |
TId |
Fee |
Membership |
|
C1 |
Sabina |
F |
G101 |
10000 |
12 |
|
C2 |
Rohit |
M |
G101 |
9000 |
10 |
|
C3 |
Asad |
M |
G102 |
12000 |
15 |
|
C4 |
John |
M |
G103 |
6000 |
6 |
|
C5 |
Aastha |
F |
G104 |
8000 |
8 |
|
C6 |
Neha |
F |
G102 |
9000 |
10 |
|
C7 |
Zubain |
M |
G102 |
10000 |
12 |
|
C8 |
Deljeet |
F |
G104 |
6000 |
6 |
Choose correct SQL query to update the membership of all the customers, under Trainer with code G101 and G102, to 12 months.
Update Customer
Set Membership = 12
Where TId = "G101" or TId = "G102";
Alter table Customer
Add Membership = 12
Where TId = "G101" or TId = "G102";
Update Customer
Set Membership = 12
Where TId = "G101" and TId = "G102";
Update Customer
Add Membership= 12
Where TId = "G101" or TId = "G102";