摘要:
一个sql语句中如果有子查询,会较大的影响查询效率。 在子查询的表跟父查询的表有关系的情况,可以通过表关联的方式优化效率。 例如: select a.id, a.name, (select b.name from table2 b where b.code = a.id) as comenamefr 阅读全文
摘要:
--查询表名及说明select distinct table_name,comments from(select a.table_name, b.comments from user_tables a, ALL_TAB_COMMENTS b where a.table_name = b.table_ 阅读全文