Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在比较两个有很多列的表。我对除时间戳和日期之外的所有列都感兴趣。
我正在这样做:
select row1, row2, row3, row4, ..., row39, row40 from mytable1 minus select row1, row2, row3, row4, ..., row39, row40 from mytable2;
我一一选择所有列,除了日期和时间戳这三列。
我怎样才能简化这一切,不必一一放置所有的列?
你不能真正“简化”它。您可以使用查询轻松获取所有列,例如:
select column_name from user_tab_columns where table_name = 'mytable1' data_type not in ('date' . . .)
使用列名,您可以手动构建查询,而无需输入所有列名。