将ID存储为逗号分隔的值

问题描述:

如何从数据库中选择ID储存在以varchar逗号分隔的所有行.例如,我有一个与此相关的表:

How can I select from a database all of the rows with an ID stored in a varchar comma separated. for example, I have a table with this:

, 7, 9, 11

如何选择具有这些ID的行?

How can I SELECT the rows with those IDs?

规范化数据库.您应该最有可能使用查找表.

Normalize your database. You should be using a lookup table most likely.