Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 renaming keys and indexes

Author  Topic 

sacok
Starting Member

9 Posts

Posted - 2001-01-30 : 12:13:56
hi
i want to do this task using a script as i am new to writing T_SQL,I thot i could get some help here
how would i go about doing it on sql 6.5
a) indexes that are named pk_ and are not primary keys. These indexes need to be changed to primary keys.
b) primary keys that are not prefixed pk_ are renamed to be prefixed by pk and not by idx or any other prefix
c) for all tables without a primary key amend an index to become a primary key.

dc
   

- Advertisement -