有相应的查询权限这样是没有问题的 select * from user1.gyq,user2.gyq,user3.gyq,user4.gyq where id='电器'
有相应select权限的话 select * from user1.gyq t1,user2.gyq t2,user3.gyq t3,user4.gyq t4 where t1.id="电器" and t2.id="电器" and t3.id="电器" and t4.id="电器" 只写 id="电器"的话,系统分不清你要的是那个表的id="电器". 没权限就grant select on for_gyq to user1给权限
t1.id="电器" and t2.id="电器" and t3.id="电器" and t4.id="电器"...... 表名称,字段名与结构都一样,也要向上面一样写吗?因为有20个用户!!!
select * from user1.gyq,user2.gyq,user3.gyq,user4.gyq where id='电器'
select * from user1.gyq t1,user2.gyq t2,user3.gyq t3,user4.gyq t4
where t1.id="电器" and t2.id="电器" and t3.id="电器" and t4.id="电器"
只写 id="电器"的话,系统分不清你要的是那个表的id="电器".
没权限就grant select on for_gyq to user1给权限
表名称,字段名与结构都一样,也要向上面一样写吗?因为有20个用户!!!