Here is a problem. I need to have 2 columns in a table both varchar(50). First Column is name of certain thing within a certain group which is defined by the second column.
First column | Second Column
thingone | group one
thingtwo | group one
thingone | group two
Above is an example which I want to achieve by having these to columns. And my question is how to place keys in order to do it. I know there is a easier way by having third column with id. But I am asking for possibilities looking similar to one above.
You can make a primary key that contain’s both columns.
Read the link’s article http://weblogs.sqlteam.com/jeffs/archive/2007/08/23/composite_primary_keys.aspx