B
B
beduin012020-02-11 11:34:19
SQL
beduin01, 2020-02-11 11:34:19

What is the difference between materialized view and with?

It seems that both the first and second statements create a temporary table. What are the differences?

I will clarify. Interesting on two DB. PostgreSQL and Oracle. Is there a difference in them?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2020-02-11
@beduin01

materialized view - creates a very real structure where the data will be at the time of creation. If you change them in the active table, then they do not change in the view. Well, perhaps physically they are somehow tied to the data version from the current table, but that's not the point.
with is just syntactic sugar for the convenience of writing a query. Although it allows you to do things that are not possible with the usual writing of a query.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question