Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 07:41 AM
In place schema adjustment =>
Then ALTER TABLE XXX ADD/DROP COLUMN XXX INT
Example
Then ALTER TABLE XXX ADD/DROP COLUMN XXX INT
Example
create table test (id int, first_name string, last_name string ); insert into test values (1, 'john', 'smith'); alter table test add column age int; select * from test
Create a new table with an adjusted Schema =>
Then CTAS should do the trickCREATE OR REPLACE TABLE [new_table] AS ( SELECT * FROM OLD_TABLE ... )
Then CTAS should do the trickCREATE OR REPLACE TABLE [new_table] AS ( SELECT * FROM OLD_TABLE ... )