|Re: [firebird-support] Re: Rename Primary Key Foreign Key or Index
> and I have a Primary Key on Field1.the
> I want to change the Primary Key to be on Field3.
> The problem is that I don't know the name of the key!!!
> I know I can see it using either a sql script or any db management utility
> but my script has to work on databases with PK with different names and
> should be done ONLY using sql script
> So as far as I can tell I have to find a way to change the definition of
> PK in the system tables or find a way to drop it and create the new oneIn short - there's no command like:
ALTER TABLE table1 DROP PRIMARY KEY;
That would be a nice addition, but currently, there isn't one.
Database Workbench - developer tool for InterBase, Firebird & MS SQL Server.