Top "Constraints" questions

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

How to drop all NOT NULL constraints from a PostgreSQL table in one go

Is it possible to drop all NOT NULL constraints from a table in one go? I have a big table …

sql postgresql constraints sql-drop notnull
How do I add a custom CHECK constraint on a MySQL table?

I am having trouble with this table CREATE TABLE `Participants` ( `meetid` int(11) NOT NULL, `pid` varchar(15) NOT NULL, `status` char(1) …

mysql sql database constraints check-constraints
Get the unique constraint columns list (in TSQL)?

I can get a list of unique constraints fairly easily with the following query: select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS …

sql-server tsql metadata constraints
How to create a custom UITableViewCell programmatically using AutoLayout

I'm trying to implement a UITableView that will behave similarly to the timeline of a twitter client. Right now I'm …

ios objective-c uitableview constraints autolayout
Displaying the constraints in a table

Hello I am trying to display the constraints in one of my tables but for some reason I get the …

sql oracle constraints sqlplus
Can you replace or update a SQL constraint?

I have written the following constraint for a column I've called 'grade': CONSTRAINT gradeRule CHECK grade IN (‘easy’, ‘moderate’, ‘difficult’), …

sql constraints sql-update
SQL constraint minvalue / maxvalue?

Is there a way to set a SQL constraint for a numeric field that min value should be 1234 and max …

sql constraints
How to add a not null constraint on column containing null values

I have a table with a column that contains a few null values. I want to add a NOT NULL …

sql oracle plsql oracle11g constraints
How to use an auto incremented primary key as a foreign key as well?

This is what I'm trying to do: I have 2 tables... CREATE TABLE `parent` ( `id` int(11) NOT NULL AUTO_INCREMENT, `data` …

mysql foreign-keys constraints auto-increment database-relations
Unique constraint that allows empty values in MySQL

I have a field that stores product codes. The codes are unique, but some products simply doesn't have a code. …

mysql database-design constraints