UPDATE xtest_keyid_ys SET sets='a' WHERE kid='a1'; -- 无效
UPDATE xtest_keyid_ys SET sets='s2' WHERE kid='a1'; -- ok
UPDATE xtest_keyid_ys SET sets='6' WHERE kid='a1'; -- ok
UPDATE xtest_keyid_ys SET sets=7 WHERE kid='a1'; -- ok
UPDATE xtest_keyid_ys SET sets='s2,s3,s4' WHERE kid='a1'; -- ok
UPDATE xtest_keyid_ys SET sets='s4,s2,s3' WHERE kid='a1'; -- ok
结果其实是:s2,s3,s4(14)
* 搜索多个
SELECT * FROM xtest_keyid_ys WHERE sets=10; -- ok,但要换算
SELECT * FROM xtest_keyid_ys WHERE sets=20; -- ok,但要换算
SELECT * FROM xtest_keyid_ys WHERE sets=14; -- ok,但要换算
SELECT * FROM xtest_keyid_ys WHERE sets='s2,s4'; -- ok,顺序要一致
SELECT * FROM xtest_keyid_ys WHERE sets='s3,sa'; -- ok,顺序要一致
SELECT * FROM xtest_keyid_ys WHERE sets='s2,s3,s4'; -- ok,顺序要一致
* 搜索单个
SELECT * FROM xtest_keyid_ys WHERE sets IN('s2','s4'); -- ok,只找其中一个,不是组合
SELECT * FROM xtest_keyid_ys WHERE sets IN('s3','sa'); -- ok,只找其中一个,不是组合
SELECT * FROM xtest_keyid_ys WHERE sets IN('s2','s3','s4'); -- ok,只找其中一个,不是组合
* 用不了索引
SELECT * FROM xtest_keyid_ys WHERE sets&2=2;
SELECT * FROM xtest_keyid_ys WHERE sets='s4,s2'; -- xx,交换文字不行
SELECT * FROM xtest_keyid_ys WHERE sets='sa,s3'; -- xx,交换文字不行
SELECT * FROM xtest_keyid_ys WHERE sets='s2,a,s4'; -- xx,交换文字不行