How to tag a field in sql server? I want to categorizes things in data base so that one thing can be in several categories. I have a table for categories. I want to make foreign key to them but how can I make a field have several value? is there a way to make the coulmns dynamically or have an array of an enumeration or array of another table fields?
In generally, when you have a many to many relationship (one "thing" can be in many categories, one category can have many "things" in it), you have to set up a linking table to tie the two things together.

Each row in the linking table would have the ID of one row in the "thing" table, and of one row in the category table. So, many rows could be used to tie a given "thing" to its categories, and many rows could tie different "things" to a given category.

The thing_id and category_id columns in the linking table would be foreign keys to the "thing" and category tables (respectively).