+ 1
Anybody explain the below lines in simple language so that i can understand.
A view always shows up-to-date data! The database engine uses the view's SQL statement to recreate the data each time a user queries a view.
1 Antwort
+ 4
A View is just a query stored under a specific name,
e.g. you can define a view called "AllPeopleOver18":
CREATE VIEW AllPeopleOver18 as (
SELECT * FROM People as p
WHERE p.age > 18
ORDER BY p.lastname
)
Later you can use that view by simply writing:
"SELECT * FROM AllPeopleOver18"
instead of the whole query over and over again