mysql in子句问题请教

浏览:901 发布日期:2016/03/21 分类:求助交流 关键字: mysql in子句问题请教
1、select role_auth_ids from test_role where role_name='经理' 的执行结果:
+------------+
role_auth_ids
+------------+
1,2,3

2、select auth_name from test_auth where auth_id in (1,2,3)的执行结果:
+------+
auth_name
+------+
商品管理
商品添加
商品编辑

但是,将1、2条语句合并后,即select auth_name from test_auth where auth_id in (select role_auth_ids from test_role where role_name='经理'),执行结果只有一条数据,也就是只有商品管理一个数据。这是why?
最佳答案
评论( 相关
后面还有条评论,点击查看>>