I would recommend against that, it goes against the normalization rules.
See I keep messing up 1NF
Or read up on the posts under the normalization tag.
Redesign suggestion for tables
If you make a tag and taglink table like so.
table tag
id autoincrement integer primary index
tag_str varchar(20) index unique not null
table taglink
id autoincrement integer primary index #gotta have an ID in my book.
tag_id integer not null
product_id integer not null
and you have a sales table something like this.
table product
id autoincement integer primary index
desc varchar(255)
barcode, price, whatever ...
select statement to find products per tag
Than you can lookup articles that match a tag as follows.
select * from product
inner join taglink on (product.id = taglink.product_id)
inner join tag on (taglink.tag_id = tag.id)
where tag.tag_str in ('foo','bar','baz');
select statement to list tags per product
select tag_str from tag
inner join taglink on (taglink.tag_id = tag.id)
inner join product on (taglink.product_id = product.id)
where product.barcode = '4548215' or product.desc like 'OMG Po%'
Adding new tags
To add a new tag, just
insert into tag (id, tag_str) values (
null /*remember autoincrement*/
,'Mytag');
linking a tag
To link a tag to a product
set @product_id = 10;
set @tag_id = 1;
...or...
select @product_id:= product.id from product where product.barcode = '1254851';
...
insert into taglink (id, product_id, tag_id) values (
null /*autoinc id*/
,@product_id
,@tag_id );
You can link an unlimited number of tags to a product and you don't slow your queries down with costly FIND_IN_SET
statements.
And you prevent duplicate tags.
And your database will be faster and smaller.