Top "Constraints" questions

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

What is the proper way to catch and handle ORA-00001 SQLException with JDBC?

I'm creating a simple form that stores entered data in an extremely simple Oracle database table via a Java Servlet …

oracle jdbc primary-key constraints ora-00001
Constraint violation / Duplicate key when reindexing Magento

I am using Magento CE 1.6.2 and I have a problem with my reindexer ( the url_rewrite ) php shell/indexer.php …

magento pdo duplicates constraints zend-db
Add a column to a table with check constraint SQL

I want to add a column to a table, then add a check constraint to make sure its greater than 0. …

sql oracle11g constraints alter
Creating composite foreign key constraint

I am trying to create a composite foreign key relationship/constraint. All tables are empty. I have this table: CREATE …

tsql foreign-keys constraints composite-key
Removing All Primary Keys

This is going to sound like a crazy request. The databases that I report from do not have any foreign …

tsql sql-server-2000 constraints information-schema
Is there a generic constraint I could use for the + operator?

is there some 'where' type contraints in can add to make the follwing code compile ? public class Plus<T&…

c# generics constraints
drop index or constraint without knowing its name for Oracle

On a oracle database I have a foreign key, without knowing its name, just the column_name and the reference_…

sql oracle constraints sql-drop
How can I constrain multiple columns to prevent duplicates, but ignore null values?

Here's a little experiment I ran in an Oracle database (10g). Aside from (Oracle's) implementation convenience, I can't figure out …

oracle null nullable constraints unique-index
Prevent empty strings in CHARACTER VARYING field

I am using PostgreSQL and would like to prevent certain required CHARACTER VARYING (VARCHAR) fields from allowing empty string inputs. …

postgresql constraints varchar
Difference between Constraints and Rules in SQL

What is the difference between using constraints and rules in SQL, preferably SQL server 2008 R2. Can anyone explain and demonstrate …

sql sql-server constraints business-rules