select * from ${db_table} 怎么写为若是传递的多个表名,db_table为db_a,db_b的话会怎么样。想要实现一下查询多个表
不支持
参考
动态表 https://help.fanruan.com/finereport/doc-view-4187.html
根据参数查看不同报表 https://help.fanruan.com/finereport/doc-view-407.html
参数查询数据库任一表 https://help.fanruan.com/finereport/doc-view-3024.html
select * from ${SUBSTITUTE(db_table,","," UNION ALL select * from ")}
不过你得保证db_a,db_b的字段完全一样,不然不能用星号查询的
拼接表union可以实现,但使用这个的前提是数据字段要一致并经过排列加工,实际是不推荐使用union 的,如果多个数据表之间有关联关系,建议先通过join 去关联,然后设置参数,进行查询。