select t.name,t.idcard_num,t.bank_info,t.bank_cardno ,(select od.status from orderinfo od where od.is_end =1 and od.stu_id = t.id ) as sb_status,t.rowid from student_info t where 1=1 这个sql语句错了,但是我找不到原因,。。。
select t.id, t.name 加上t.id试试?
具体sql报什么错误啊?
最好把报错信息也发下。估计是(select od.status from orderinfo od where od.is_end =1 and od.stu_id = t.id ) 返回了多个值的问题。
select t.name,t.idcard_num,t.bank_info,t.bank_cardno ,
od.status as sb_status,
t.rowid from student_info t,orderinfo od where od.is_end =1 and od.stu_id = t.id
这种写法不可以吗
select t.name,t.idcard_num,t.bank_info,t.bank_cardno ,
od.status as sb_status,
t.rowid from student_info t,orderinfo od where od.is_end =1 and od.stu_id = t.id
这种写法不可以吗
应该是子查询的问题,最好把sql语句放在from之后作为一个伪表