Ts naughty chatrooms - Updating data in a view sql
When a view is created in SQL Server, metadata for the referenced table columns (column name and ordinal position) is persisted in the database.
The examples for this chapter are two join views that do some calculations and some more views using them in turn.
(But it won't expand , so rewriting is complete and the above is the final result given to the planner.
Now we want to write a query that finds out for which shoes currently in the store we have the matching shoelaces (color and length) and where the total number of exactly matching pairs is greater or equal to two.
The rewriter uses them to store the access privilege check information that was originally present in the range-table entry that referenced the view.