How to delete part of value from column in teradata sql?

by tressie.damore , in category: MySQL , 19 days ago

How to delete part of value from column in teradata sql?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by domenico , 18 days ago

@tressie.damore 

To delete part of a value from a column in Teradata SQL, you can use the REPLACE function.


For example, if you have a column name in a table employees and you want to remove the word "Company" from all the values in that column, you can use the following SQL query:

1
2
UPDATE employees
SET name = REPLACE(name, 'Company', '')


This query will replace the word "Company" with an empty string in all the values of the name column in the employees table.


Make sure to backup your data before running any update query to avoid any unexpected data loss.