我想從user_info表中獲取所有admin用戶。在user_info表中,組列存在多值屬性。我已經試過是:如何在SQL中獲取MultiValued屬性
select * from user_info where 'admin' IN Split(',',groups);
我得到這個錯誤:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Split(',',groups)
user_info表中
username | groups |
---------------------------------
[email protected] | superadmin,admin
組表
groupID(AutoIncr) | groups |
---------------------------------
1 | superadmin |
2 | admin |
老逗號分隔的項目的問題......我對不起,但那隻會導致你很多問題。 – jarlh