达梦,oracle获取表信息sql完善修复

This commit is contained in:
diantu
2023-02-07 17:45:41 +08:00
parent 679eca9196
commit c04e322f7c
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@
do.LAST_DDL_TIME as updateTime,
dtc.COMMENTS as "comment"
from dba_tables dt
left join dba_objects do on do.owner = dt.owner and do.object_name = dt.table_name
left join dba_objects do on do.owner = dt.owner and do.object_name = dt.table_name and do.object_type='TABLE'
left join dba_tab_comments dtc on dtc.owner = dt.owner and dtc.table_name = dt.table_name
where dt.owner = #{dbName} and dt.table_name = #{tableName}
</select>

View File

@@ -29,7 +29,7 @@
do.LAST_DDL_TIME as updateTime,
dtc.COMMENTS as "comment"
from dba_tables dt
left join dba_objects do on do.owner = dt.owner and do.object_name = dt.table_name
left join dba_objects do on do.owner = dt.owner and do.object_name = dt.table_name and do.object_type='TABLE'
left join dba_tab_comments dtc on dtc.owner = dt.owner and dtc.table_name = dt.table_name
where dt.owner = #{dbName} and dt.table_name = #{tableName}
</select>