Hi
I was wondering whether we can create referential integrity constraints on
indexed views in SQL Server 2000. We are trying to create a data model and
would like to know whether we can enforce constraints on indexed views,
otherwise we may have to go for tables.
Please inform.
Thanks
BobBob,
Not that I'm aware of - never seen anyone add a constraint to a
view(indexed). Would probably have to handle this at the table level with
constraints or triggers.
HTH
Jerry
"Bob" <Bob@.discussions.microsoft.com> wrote in message
news:B911616E-39CC-4879-B485-58ED9E951E23@.microsoft.com...
> Hi
> I was wondering whether we can create referential integrity constraints on
> indexed views in SQL Server 2000. We are trying to create a data model and
> would like to know whether we can enforce constraints on indexed views,
> otherwise we may have to go for tables.
> Please inform.
> Thanks
> Bob|||The indexed view ultimately gets it data from the underlying tables. So if
they have the proper constraints the view will never see incorrect data.
--
Andrew J. Kelly SQL MVP
"Bob" <Bob@.discussions.microsoft.com> wrote in message
news:B911616E-39CC-4879-B485-58ED9E951E23@.microsoft.com...
> Hi
> I was wondering whether we can create referential integrity constraints on
> indexed views in SQL Server 2000. We are trying to create a data model and
> would like to know whether we can enforce constraints on indexed views,
> otherwise we may have to go for tables.
> Please inform.
> Thanks
> Bob
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment