Vidyalelo
MySQL · Q1050

MySQL

Programming · MySQL · question 1050

Q1050

In the following MySQL query, "person_1" belongs to which category of table in MySQL? CREATE VIEW person_1 AS SELECT fname, lname, person_id FROM person;

A.
Permanent Tables
B.
Virtual tables
Answer
C.
Temporary tables
D.
None of the mentioned

Answer: Option B

Solution

Answer: Option B
Solution:
This question asks about the type of table "person_1" is in a MySQL query. Let's break it down:

The code you see is a CREATE VIEW statement. Views in MySQL are like special virtual tables.

Here's why:
* They don't store data directly: A view doesn't have its own data. It simply takes data from another table (in this case, the "person" table). * They act as a shortcut: Views let you select specific columns (fname, lname, person_id) from the "person" table and give them a new name ("person_1"). This makes accessing the data easier.

So, the answer is Option B: Virtual Tables.