Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Default value is not reflecting in the table for a column - response (1) by dnoeth

$
0
0

A default value is only set where there's no value supplied, and "no value" is not the same as NULL.
For single row inserts:
insert into table(a,b,NULL) will keep the NULL.
 
insert into table(a,b,) will set the default.
This is based on Standard SQL and should be the same for all RDBMSes.
 
For Insert/Selects you should use the DEFAULT function:
insert into target select a,b, DEFAULT(c) from source
 
Dieter

 


Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>