>My application have Views, so I create a primary key in all the tables I use in views. Because I can`t create a primary key programatically, when this index is damage, I must remove the table from database to delete the primary key, do the "REINDEX" command, join the table again to the database, MODIFY STRUCTURE to create the primary key again, all this manually. So if I create a CANDIDATE index (is a primary key with a different name) with the INDEX ON command, the Views consider this as a primary key, if not, how can I recover the primary keys programatically ?
>
>Thanks
Look at the ALTER TABLE command for programmatic creation/deletion of primary key.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer