数据表如下:
table1:openid,field1,field2....
table2:openid1,openid2
请教各伴大神,如何在云开发实现SQL查询功能,如下:
即查找某字段在某数组内的所有记录
sql语法:
select * from table1 where openid in
(select distinct openid2 from table2 where openid1='123456789456')
非常感谢
数据表如下:
table1:openid,field1,field2....
table2:openid1,openid2
请教各伴大神,如何在云开发实现SQL查询功能,如下:
即查找某字段在某数组内的所有记录
sql语法:
select * from table1 where openid in
(select distinct openid2 from table2 where openid1='123456789456')
非常感谢
2 个回答
at new u (WAService.js:1)
at Function.success (WAService.js:1)
at Object.success (WAService.js:1)
at r (WAService.js:1)
at WAService.js:1
at v (WAService.js:1)
at WAService.js:1
at t.
at WAService.js:1
at WAService.js:1
提示这个,是不是权限问题,但我修改了权限,还是出错!
我要的是where条件,过滤table1的条件,获取符合条件的table1记录。
即TABLE1中的OPENID存在于子查询里的意思
谢谢啦,我刚在看!