title: Updating a SQL table in presto
body: <p>So I'm trying to update the values of a column of a table in Presto SQL; however, it seems there is no UPDATE query in the Presto documentation as noted in here: <a href="https://prestodb.github.io/docs/current/sql.html" rel="nofollow noreferrer">https://prestodb.github.io/docs/current/sql.html</a></p>
  
  <p>So basically my script involves a series of queries which merges a bunch of tables and then at the very end I want to update the values of one of the columns of the table</p>
  
  <pre><code>WITH tableA AS (
     do stuff here
  ),
  tableB AS ( 
     do stuff here
  ),
  .
  .
  .
  .
  finalTable AS (
     do final merge of tables from above
  )
  UPDATE
      finalTable
  SET
      colD = REPLACE( REPLACE( REPLACE(UPPER(colD), '[', ''), ']', ''), ':', '')
  WHERE
      colD IS NOT NULL
  SELECT *
  FROM
     finalTable
  
  </code></pre>
  
  <p>I've tried using <code>ALTER TABLE</code> (<a href="https://prestodb.github.io/docs/current/sql/alter-table.html" rel="nofollow noreferrer">https://prestodb.github.io/docs/current/sql/alter-table.html</a>) which seemed close enough to <code>UPDATE</code> but didn't have any luck with that either and would give the following error <code>mismatched input 'ALTER'. Expecting: '(', 'SELECT', 'TABLE', 'VALUES'</code> Does anyone know the proper way to do a column update in Presot?</p>