Vidyalelo
MySQL · Q853

MySQL

Programming · MySQL · question 853

Q853

How can a view refer to multiple tables?

A.
UNION
B.
JOIN
Answer
C.
GROUP
D.
SELECT

Answer: Option B

Solution

Answer: Option B
Solution:
This question is about how to combine data from different tables in a view. A view is like a saved query that lets you access data in a simplified way.
Let's break down the options:
Option A: UNION - UNION combines the results of two or more SELECT statements, but it doesn't link data between tables.
Option B: JOIN - JOIN is the correct answer! It connects data from different tables based on common columns, allowing you to create a combined view.
Option C: GROUP - GROUP is used to group rows based on a common value, not to combine tables.
Option D: SELECT - SELECT is used to fetch data from tables, but it doesn't specify how to combine them.
So, the answer is Option B: JOIN - You use JOIN to combine data from multiple tables in a view.