How to create view by joining multiple tables

Need better example to understand, I found normal as below.

CREATE VIEW vw_combined AS
   SELECT * 
    FROM TABLE1 t1
    JOIN TABLE2 t2 ON t2.col = t1.col
Asked on September 22, 2020 in Mysql.
Add Comment
1 Answer(s)

CREATE VIEW `general_v_movie_rentals` AS SELECT mb.`membership_number`,mb.`full_names`,mo.`title`,mr.`transaction_date`,mr.`return_date` FROM `movierentals` AS mr INNER JOIN `members` AS mb ON mr.`membership_number` = mb.`membership_number` INNER JOIN `movies` AS mo ON mr.`movie_id` = mo.`movie_id`;

Answered on September 22, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.