I tried to search but I have not found anything. I am trying to add two columns to a table withe a default value (Teradata). I am trying with this statement
ALTER TABLE TEST add (DWH_Change_dt date default CURRENT_DATE, dwh_create_dt date default current_date); This does not work with default clause. I get this error
Syntax error, expected something like a 'BETWEEN' keyword or an 'IN' keyword or a 'LIKE' keyword or a 'CONTAINS' keyword between the word 'DWH_Change_dt' and the 'date'
If I add one column at a time it works (without parenthesis). Anyone has any idea? What is wrong?
Thanks, Umberto
1 Answer
If you want to add multiple columns you need multiple ADDs:
ALTER TABLE TEST add DWH_Change_dt date default CURRENT_DATE, add dwh_create_dt date default current_date; 0