SQL Server “pseudo/synthetic” composite Id(key)
问题 Sorry but I don't know how to call in the Title what I need. I want to create an unique key where each two digits of the number identify other table PK. Lets say I have below Pks in this 3 tables: Id Company Id Area Id Role 1 Abc 1 HR 1 Assistant 2 Xyz 2 Financial 2 Manager 3 Qwe 3 Sales 3 VP Now I need to insert values in other table, I know that I may do in 3 columns and create a Composite Key to reach integrity and uniqueness as below: Id_Company Id_Area Id_Role ...Other_Columns..... 1 2 1