How can I add a Primary Key to user defined table after it's been created and in use? I can't script as ALTER, and I can't drop and re-create because it's being referenced by a bunch of procedures.
We have a user defined table type that has a single int column that we use to as a result set filter against some big tables. Whoever created the key didn't add a primary key, it's just a TABLE ([ID] [int] NOT NULL). If I use this in a new query, it's doing a full table scan of the large tables and eliminating any benefit of the table join. Is there any way I can add a key after the fact?