Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Fri, 30 Mar 2012 @ 21:36:19 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Query to compare columns
 
From:   patmckeown

Assuming the view is a straight view of the columns in the table, and you want to list the columns excluded from the view, then:

     SELECT columnname FROM dbc.COLUMNS
        WHERE databasename = 'table_DB'
          AND tablename = 'table_name'

     MINUS

     SELECT columnname FROM dbc.COLUMNS
        WHERE databasename = 'view_DB'
          AND tablename = 'view_name'
     ;

Pat McKeown
Discover Financial Services



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020