Skip to content

Commit

Permalink
优化Oracle数据字典查看时排除回收站内的表
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhuhongLee authored and LeoQuote committed Mar 28, 2024
1 parent ef15be0 commit 1430728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/engines/oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def get_all_tables(self, db_name, **kwargs):

def get_group_tables_by_db(self, db_name):
data = {}
table_list_sql = f"""SELECT table_name, comments FROM dba_tab_comments WHERE owner = :db_name"""
table_list_sql = f"""SELECT a.table_name,a.comments FROM dba_tab_comments a,all_tables b WHERE a.table_name=b.table_name AND a.owner=b.owner AND a.owner=:db_name"""
result = self.query(
db_name=db_name, sql=table_list_sql, parameters={"db_name": db_name}
)
Expand Down

0 comments on commit 1430728

Please sign in to comment.