Top "Constraints" questions

A constraint is a condition that has to be fulfilled in a given context.

Add primary key to existing table

I have an existing table called Persion. In this table I have 5 columns: persionId Pname PMid Pdescription Pamt When I …

sql sql-server sql-server-2008 constraints primary-key
How can foreign key constraints be temporarily disabled using T-SQL?

Are disabling and enabling foreign key constraints supported in SQL Server? Or is my only option to drop and then …

sql-server tsql foreign-keys constraints
How to truncate a foreign key constrained table?

Why doesn't a TRUNCATE on mygroup work? Even though I have ON DELETE CASCADE SET I get: ERROR 1701 (42000): Cannot truncate …

mysql foreign-keys constraints truncate dml
Display names of all constraints for a table in Oracle SQL

I have defined a name for each of the constraint for the multiple tables that I have created in Oracle …

sql oracle oracle11g constraints
MySQL Removing Some Foreign keys

I have a table whose primary key is used in several other tables and has several foreign keys to other …

mysql foreign-keys constraints mysql-error-1025
SQL DROP TABLE foreign key constraint

If I want to delete all the tables in my database like this, will it take care of the foreign …

sql-server foreign-keys constraints database-table drop-table
Turn off constraints temporarily (MS SQL)

I'm looking for a way to temporarily turn off all DB's constraints (eg table relationships). I need to copy (using …

sql sql-server sql-server-2005 constraints entity-relationship
How to remove constraints from my MySQL table?

I want to remove constraints from my table. My query is: ALTER TABLE `tbl_magazine_issue` DROP CONSTRAINT `FK_tbl_…

mysql foreign-keys constraints alter
Oracle find a constraint

I have a constraint called users.SYS_C00381400. How do I find what that constraint is? Is there a way …

sql oracle constraints
How to drop all user tables?

How can I drop all user tables in oracle? I have problem with constraints. When I disable all it is …

oracle constraints sql-drop