cancel
Showing results for 
Search instead for 
Did you mean: 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to modify data type of a column explicitly via DBSQL

xwen
New Contributor II
1 REPLY 1

xwen
New Contributor II

 

In place schema adjustment =>
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 ... )

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now