I've fallen into the habit of assigning Surrogate (artificial) keys when doing my relational designs. I've got a client who needs a database with an "Intelligent" primary key on one of the tables. More specifically he would like the Primary Key to be a "Product Number" that follows their businesses internal specifications.
I was assuming I would use a trigger to generate new Product Numbers but I have read here that triggers cannot be used to generate Primary Keys. I am not finding any reference to this limition in the Books Online, can someone please confirm and point me to a reference?
In general, am I cracking this nut the right way? Are triggers the best way to go to create "intelligent" primary keys that require some business logic in their generation?
Thanks!
- Gary
I was assuming I would use a trigger to generate new Product Numbers but I have read here that triggers cannot be used to generate Primary Keys. I am not finding any reference to this limition in the Books Online, can someone please confirm and point me to a reference?
In general, am I cracking this nut the right way? Are triggers the best way to go to create "intelligent" primary keys that require some business logic in their generation?
Thanks!
- Gary