Is it possible to create such a view ?
Thanks
Yes you can do it:
Create view my_view
as
select *
from
database1.schema3.table3
join database2.schema5.table6 on ....
union database3.schema5.table8
Keep in mind that if you are going to grant select privileges on this view to a specific user/role, you must grant same privileges on all underlyeing tables.
To make things simpler you can also create synonyms to that tables, like in Oracle, but you have to qualify whem with database names.
|||Thanks !And this view can reside in any of the DBs, isn't it ?|||Yes, it can reside on any USER db, don't place it in master, tempdb, etc.
No comments:
Post a Comment