对比2个数据库 表的共有字段

数据迁移,相同字段如何统计?

SELECT wm_concat(COLUMN_NAME) from (
SELECT OWNER
,TABLE_NAME
,COLUMN_ID
,COLUMN_NAME
,DATA_TYPE
,DATA_LENGTH
FROM DBA_TAB_COLUMNS
WHERE OWNER='BUAABHXG'
AND TABLE_NAME='UUFS_XSXX_XJB' ) A WHERE A.COLUMN_NAME IN (SELECT COLUMN_NAME
FROM DBA_TAB_COLUMNS
WHERE OWNER='UUFNEWXG'
AND TABLE_NAME='UUFS_XSXX_XJB')

原文链接: https://www.cnblogs.com/kerrycode/p/4664094.html

 

posted @ 2021-03-16 15:55  老街巷口熟睡的猫  阅读(86)  评论(0编辑  收藏  举报