我有一个使用PG的Rails应用程序。我想使用pgAdmin搜索某些用户角色。
这是行不通的:
select * from users where user.role? :admin发布于 2018-03-05 15:14:18
如果您的role表中有一个users列:
select * from users where users.role = 'admin';看起来您在S的末尾遗漏了一个user.role
对于简单的查询,这就足够了:
select * from users where role = 'admin';https://stackoverflow.com/questions/49113520
复制相似问题