15 August 2018 · dan-irving ·       Add to Favorites   Report

How to alter table and add multiple columns with default value in Teradata

Scenario:

We are trying to add two columns to a table withe a default value 


Solution:

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;

dan-irving

posted on 15 August 2018

Read great educational content like this and a lot more !

Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too

Copied