SQL Program
SQL Program
Write a query to update the locality to '21 Changi South Avenue 1, Singapore' for
the station named 'Expo MRT Station'.
update station set locality='21 Changi South Avenue 1,Singapore' where name='Expo
MRT Station';
Write a query to delete the records with station name as 'Kovan MRT station' in the
'station' table
delete from station where name= 'Kovan MRT station';
1.Write a query to display all the details of the 'station' table, which does not
have any interchanges. Display the records in ascending order based on the 'name'.
Hint:
Use is_interchange attribute to check for the condition.
select * from station where is_interchange=0 order by name;
2.Write a query to display all the details of the travel_card table, in which the
name of person is 'Michael'.
select * from travel_card where person_name='Michael'
3.Write a query to display all details of the station whose name starts with the
letter 'K'. Display the records in ascending order based on the name.
select * from station where name like 'K%' order by name;
5.Write a query to display details of the train_arrival_time which does not have
any deviation. Display the records in ascending order based on the metro_train_id.
select * from train_arrival_time where deviation=0 order by metro_train_id;