4 ms·
Indeed, and i'm not buying the "nothing is reusable". Sql views are in my opinion the opposite, as they make every query reusable.
by ako 5y ago
Indeed, and i'm not buying the "nothing is reusable". Sql views are in my opinion the opposite, as they make every query reusable.
- cerved 5y agothe downside with views it's that they are persistent so you can't reuse it only in the context of one connection you can use CTEs but only with one query
- zimpenfish 5y ago> persistent so you can't reuse it only in the context of one connection Don't e.g. Postgres temporary views cover this case? "Temporary views are automatically dropped at the end of the current session."
- cerved 5y ago¯\_(ツ)_/¯ I expect vendor specific stuff called something along the lines of temporary view would do this, yes
- gwd 5y agoUnlike functions, views don't have arguments you can use to change the output. (Edited for clarity.)
- ako 5y agoYes they do, you can use them as the source for any sql query, so they have the exact same argument options as tables.