Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 25 Jul 2003 @ 17:02:57 GMT


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


Subj:   Re: Setting a null value for a missing column
 
From:   Michael Larkins

Bruce:

You seem to indicate that several columns will not be receiving a value. Let's say that your table has 6 columns named column1 thru column6 and you wish to only insert values into column1 and column6. At the same time, your users send you the data for column6 followed by column1.

If this is true, you can do something like this:

insert into my_table (column6, column1) values (:in6, :in1);

The column list followning the table name makes it look like that is your table definition. All columns not named are automatically assigned a NULL without need to use comma separators or the word NULL.


Hope this helps,

Mike



     
  <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