代码: |
select case when a.cnt = b.cnt then '两个库结构一致' when a.cnt <> b.cnt then '两个库结构不一致' end from (select count(*) as cnt from dba_tab_columns t1, dba_tab_columns@lnk_db2 t2 where t1.owner = 'TAOBAO' and t1.owner = t2.owner and t1.table_name = t2.table_name and t1.column_name = t2.column_name and t1.data_type = t2.data_type and t1.data_length = t2.data_length and t1.nullable = t2.nullable and nvl(t1.data_precision, 0) = nvl(t2.data_precision, 0) and nvl(t1.data_scale, 0) = nvl(t2.data_scale, 0)) a, (select count(*) as cnt from dba_tab_columns where owner = 'TAOBAO') b |
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |