Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 22 Oct 2012 @ 12:41:27 GMT


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


Subj:   Re: How to find data type and nullability
 
From:   naresh.neelam

Hi Vinod,

The below query is useful to identified the column nullable from two tables in the the same data base(teradata).

i hopes it is useful.. then u can use colease or nullifzero as per your requirement on the columns returns by below query.

     SELECT A.COLUMNNAME, A.COLUMNFORMAT  FROM (SELECT
     COLUMNNAME,COLUMNFORMAT,CHARTYPE,NULLABLE,DATABASENAME
               FROM dbc.columns where tablename='TABLE1' ) A
               INNER JOIN
               ( SELECT  COLUMNNAME,COLUMNFORMAT,CHARTYPE,NULLABLE
                    from dbc.columns
                    where tablename='TABLE2' ) B
       ON  A.COLUMNFORMAT=B.COLUMNFORMAT
       AND A.CHARTYPE=B.CHARTYPE
       AND A.NULLABLE<>B.NULLABLE
       AND  A.DATABASENAME='STGDB'


     
  <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: 15 Jun 2023