Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

violating unique constraint

Status
Not open for further replies.

sammybee77

Technical User
Jun 18, 2001
98
GB
Please help

I'm trying to update 4 fields in 2 tables in one hit with a not exists clause to ensure I don't violate the primary key constraint. I'm referencing data in 3 tables to do this - Any ideas? Should it be an insert or update statement?
 
You can not update 2 tables by 1 statement: sql syntax prohibits this.
You may create a view and write instead-of trigger, but afaik read consistency is not guaranteed in this case.
 
Is it possible to write in two statements that are executed at the same time? Would you recommend SQL or PL/SQL?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top