在一个数据库中要对比两个表,看看它们的表结构是否相同,如果不同的话是那些字段不一样?
先谢谢各位了!

解决方案 »

  1.   

    pl/sql dev有表比较的功能...
      

  2.   

    -- try it
    select column_name from user_tab_cols where table_name = 'TEST'
    minus
    select column_name from user_tab_cols where table_name = 'TEST1';
      

  3.   

    -- 自已体会一下。
    select column_name,'TEST' 
     from (select column_name from user_tab_cols where table_name = 'TEST'
           minus
           select column_name from user_tab_cols where table_name = 'TEST1')
    UNION ALL
    select column_name,'TEST1' 
      FROM (select column_name from user_tab_cols where table_name = 'TEST1'
            minus
           select column_name from user_tab_cols where table_name = 'TEST')