Create View_BMS in SQL

Question:

Create View_BMS

Create view as user_travel_details which include their id, name, source and destination and display column as user_id, user_name, source and destination respectively .

Create View_BMS

Code:

Main.sql

create view user_travel_details as select tickets.user_ID as user_id,
users.name as user_name,
schedule.source as source, schedule.destination as destination
from schedule
join tickets on tickets.schedule_ID=schedule.schedule_ID
join users on tickets.user_id=users.user_id;

Recommended:

Leave a Comment

Your email address will not be published. Required fields are marked *