Closed loraxh closed 5 years ago
Can't normally get data from the view, whether someone encounters the same situation as me, how can we avoid it?
code 1 step: rows,err := dbobj.Query("select * from tableA") result :len(rows)>0
2step: create or replace view v_tableA as select XXX from tableA
3 step: rows,err := dbobj.Query("select * from v_tableA") result :len(rows)=0
Querying views should work just fine. Have a simple full code example with full SQL?
sorry!,I updated the code and found that the problem was solved.
Can't normally get data from the view, whether someone encounters the same situation as me, how can we avoid it?
code 1 step: rows,err := dbobj.Query("select * from tableA") result :len(rows)>0
2step: create or replace view v_tableA as select XXX from tableA
3 step: rows,err := dbobj.Query("select * from v_tableA") result :len(rows)=0