为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。 【DM版本】: 【操作系统】:Window 【CPU】: 【问题描述】*:查询表A这张表的一个字段为C表的表名,怎样可以实现A表查询出来的结果直接作为表名查询C表呢?
写一个拼接,把A表中的表名拼接查询语句,拿出来直接执行就能查 select 'select * from "'|| table_name ||'" ;' from A where table_name ='C'; --查询到的结果拿出来执行
写一个拼接,把A表中的表名拼接查询语句,拿出来直接执行就能查
select 'select * from "'|| table_name ||'" ;' from A where table_name ='C'; --查询到的结果拿出来执行