Re: Constraint Naming in Oracle

From: David Donigian <donigian_dave_at_bah.com>
Date: 1996/01/13
Message-ID: <donigian_dave-1301962127440001_at_156.80.155.107>#1/1


In article <4clvut$8fu_at_xmission.xmission.com>, butlerm_at_xmission.xmission.com (Mark David Butler) wrote:

> Can Oracle table integrity constraints have the same name for different tables
> in the same schema?
>
> I am in the processes of writing a DDL generation tool for Oracle and the
> SQL Reference manual section on namespaces is vague on this point. I would
> like to use a naming convention of CHECK_attribute_name for all my check
> constraints, but am not sure whether this is allowed and even more important,
> is it legal?
>

In my tests, duplicate names for integrity or check constraints are not legal even on different tables (within the same schema). Perhaps you could use

CHECK_<table_name>_<attribute_name>

David

-- 
David Donigian
Booz, Allen & Hamilton
donigian_dave_at_bah.com
Received on Sat Jan 13 1996 - 00:00:00 CET

Original text of this message