faqts : Computers : Databases : Interbase

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 8 people (75%) answered Yes
Recently 3 of 5 people (60%) answered Yes

Entry

while data pumping databases, constraints are not copied. so, how to make them in target database?

Nov 8th, 2008 12:03
John Martin, George Boutwell, prasad,


To Add Constraints:

  ALTER TABLE <TALBE NAME> ADD CONSTRAINT <CONSTRAINT NAME> <CONSTRAINT
TYPE> <CONSTRANT OPTIONS>

  For instance

  ALTER TABLE FOO ADD CONSTRAINT FKFROMFOOTOBAR FOREIGN KEY (FIELD1)
REFERENCES BAR(FIELD1)

  Or

Title:  	Custom Software Development by Agile Software
Url: 	www.customsoftwaredevelopment.co.uk
Description:  	Providers of Custom Web-Applications, Bespoke Software,
and Database Design and Development.

  ALTER TABLE FOO ADD CONSTRAINT PKFORFOO PRIMARY KEY (FIELD1)