Question : remove all the constraint of the tables

Good afternoon, I need to remove all the constraint of the tables of a particular scheme, as I can do?

Answer : remove all the constraint of the tables

and you can sue this

select 'alter table ' + t.name + ' drop constraint ' + c.name + ';' as SQL from
(select * from sys.all_objects where type in ('PK','FK','D') or type_desc like '%CONSTRAINT%') c
left join sys.all_objects t on c.parent_object_id=t.object_id
-->
alter table dates drop constraint PK_dates;
alter table numbers drop constraint PK_numbers;
alter table codes drop constraint PK_codes;
...

to get all of them copy paste the result and run ;)
Random Solutions  
 
programming4us programming4us