What is VIEW MySQL?

Member

by rosa , in category: Technology , 2 years ago

What is VIEW MySQL?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by horace , 2 years ago

@rosa VIEW is an imaginary table holding the real records, based on query statements. It fetches data from real tables and displays always updated values. We can do all the MySQL operations on it. It helps to achieve security and reusability while implementing database operations. We can hide sensitive data from end users while limiting the access of original tables.

For example, we can have a VIEW for all the employee who is older than 40 years.


1
2
CREATE VIEW older_than_fourty 
 AS SELECT * FROM employee WHERE age > 40 ;