SQL View vs Derived Table

I always thought of representation as a stored request. Recently, I needed to use Derived Tables in a project. It made me think about ideas.

Doesn’t it look the same as in the view, except that it was saved as a logical entity, where the view is built on the fly?

+6
source share
1 answer

Yes, for most purposes and purposes they can be considered as you described. They are one and the same idea.

In some DBMSs, you can do more interesting things with a view. Indexing is the first thing that comes to mind. You can also provide restrictions on access to views, as they are the proper database objects.

Take a look at Derived tables in SQL for more information.

+6
source

Source: https://habr.com/ru/post/912604/


All Articles