I've 2 columns in my data file: A1, A2.
I want to insert the contents in a table wich h've as Primary Key: A1,A2 and B3.
I want in the control file to insert a default value for column B3.
How can i do?
SQL> create table t (year number default to_char(sysdate,'yyyy'),
2 name varchar(2));
SQL> insert into t (name) values ('Th');
1 row created.
SQL> select * from t;
Technical Lead (Databases)
Thomson Reuters (Markets)
Originally posted by bensmail I can't add default value for this column, cause B3 is a year value. every year, we load data with the current year. So if we make default in table level.... it'll not work.
Why cant you set default.. you can do just by
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"