mattn / go-oci8

Oracle driver for Go using database/sql
https://mattn.kaoriya.net/
MIT License
630 stars 212 forks source link

Query a table data is normal, but query view data is empty! #349

Closed loraxh closed 5 years ago

loraxh commented 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

MichaelS11 commented 5 years ago

Querying views should work just fine. Have a simple full code example with full SQL?

loraxh commented 5 years ago

sorry!,I updated the code and found that the problem was solved.