phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miles Spielberg <mi...@box.com>
Subject Re: How to support UPSERT with WHERE clause
Date Mon, 16 Jul 2018 17:32:43 GMT
UPSERT INTO TestTable (rowPK,col1,col2,col3)
SELECT rowPK, 'xxx', 'yyy', 'zzz'
FROM TestTable
WHERE mediaID = 123

Sent from my iPhone

> On Jul 16, 2018, at 10:22 AM, alchemist <alchemistsrivastava@gmail.com> wrote:
> 
> Thanks so much William.
> 
> I have a table with say TestTable with 5 columns, say rowPK, col1, col2,
> col3, mediaId etc.    I need to update all the columns of this table for a
> set of mediaId (p.s here mediaId is not the rowkey).  Suppose the initial
> value of columns of  TestTable is row1, 'aaa', 'bbb','ccc', 123.  And we
> want to update all the column entries for mediaId 123 to say row1,
> 'xxx','yyy','zzz',123.  
> 
> 
> 
> 
> 
> --
> Sent from: http://apache-phoenix-user-list.1124778.n5.nabble.com/

Mime
View raw message