I have to delete records in quite a few of the tables of a DataWarehouse and
then populate them from else where. I'm not able to delete the records due t
o
Foreign Key constraints and I was wondering if there is a simpler way for me
to disable all the constraints in a table.
Thanks,
rgnI think you can use
alter table mytable nocheck constraint all
but I am not sure if it is a good idea as you will disable enforcing the
integrity of your data.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"rgn" wrote:
> I have to delete records in quite a few of the tables of a DataWarehouse a
nd
> then populate them from else where. I'm not able to delete the records due
to
> Foreign Key constraints and I was wondering if there is a simpler way for
me
> to disable all the constraints in a table.
> Thanks,
> rgn
2012年2月14日星期二
Disable all constraints in a table?
I have to delete records in quite a few of the tables of a DataWarehouse and
then populate them from else where. I'm not able to delete the records due to
Foreign Key constraints and I was wondering if there is a simpler way for me
to disable all the constraints in a table.
Thanks,
rgn
I think you can use
alter table mytable nocheck constraint all
but I am not sure if it is a good idea as you will disable enforcing the
integrity of your data.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"rgn" wrote:
> I have to delete records in quite a few of the tables of a DataWarehouse and
> then populate them from else where. I'm not able to delete the records due to
> Foreign Key constraints and I was wondering if there is a simpler way for me
> to disable all the constraints in a table.
> Thanks,
> rgn
then populate them from else where. I'm not able to delete the records due to
Foreign Key constraints and I was wondering if there is a simpler way for me
to disable all the constraints in a table.
Thanks,
rgn
I think you can use
alter table mytable nocheck constraint all
but I am not sure if it is a good idea as you will disable enforcing the
integrity of your data.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"rgn" wrote:
> I have to delete records in quite a few of the tables of a DataWarehouse and
> then populate them from else where. I'm not able to delete the records due to
> Foreign Key constraints and I was wondering if there is a simpler way for me
> to disable all the constraints in a table.
> Thanks,
> rgn
订阅:
博文 (Atom)