Subject | There is a simple way to rename constraint that have not a name? |
---|---|
Author | Luigi Siciliano |
Post date | 2015-01-30T17:40:54Z |
There is a way to rename constraint that have not a name?
I have a database with a no name constraint primary key in many tables.
I learned my lesson and I would repair to this situation.
There is a simple way to assign a name to all no name constraints?
Like this statement:
UPDATE
rdb$relation_constraints
SET
rdb$constraint_name = 'MyPrimaryKeyName'
WHERE
rdb$relation_name = MyTable
AND rDB$CONSTRAINT_TYPE = 'PRIMARY KEY'
There are contraindications?
Thanks
--
Luigi Siciliano
--------------------------
I have a database with a no name constraint primary key in many tables.
I learned my lesson and I would repair to this situation.
There is a simple way to assign a name to all no name constraints?
Like this statement:
UPDATE
rdb$relation_constraints
SET
rdb$constraint_name = 'MyPrimaryKeyName'
WHERE
rdb$relation_name = MyTable
AND rDB$CONSTRAINT_TYPE = 'PRIMARY KEY'
There are contraindications?
Thanks
--
Luigi Siciliano
--------------------------