ORACLE A用户下表导入b用户(同一个库) 排除b用户的表和a用户包含数字的表且a用户中以UUFS开头的表

SELECT 'CREATE TABLE',TABLE_NAME, 'AS','SELECT * FROM bhxg_20210202.'||TABLE_NAME||';' from all_all_tables WHERE owner='BHXG_20210202'
AND TABLE_NAME NOT IN (SELECT TABLE_NAME from all_all_tables WHERE owner='UUFS_2020')
AND regexp_like ( TABLE_NAME,'^[^[:digit:]]+$') AND TABLE_NAME NOT LIKE
'%SSGL%' AND TABLE_NAME LIKE 'UUFS%'

posted @ 2021-02-05 14:19  老街巷口熟睡的猫  阅读(121)  评论(0编辑  收藏  举报