Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
谁能说物化视图和同义词的优点和缺点?
最好的问候,克里斯塔普斯
那里有几篇文章:
视图、物化视图和同义词
来自 SO:使用同义词与视图的优缺点是什么?
这取决于您的需求是什么。最大的区别在于 Synonym 是对象的简单别名,您无法对其进行过滤。
这些视图允许您添加 WHERE 子句并应用列别名并为列名使用表达式。您还可以在视图级别获得额外的安全性,这是同义词中没有的。