mysql view
A view is a virtual table, Which doesn’t physically exist.
View is based on SQL select statement ie. its created by a query joining one
or more tables. View are stored as virtual table in the database and is created dynamically when view is referenced .
View are created and named and then called using that name,
and also views can be dropped using the name.
Simple View syntax
mysql> CREATE TABLE t (qty INT, price INT);
mysql> INSERT INTO t VALUES(3, 50);
mysql> CREATE VIEW v AS SELECT qty, price, qty*price AS value FROM t;
mysql> SELECT * FROM v;
+——+——-+——-+
| qty | price | value |
+——+——-+——-+
| 3 | 50 | 150 |
+——+——-+——-+
