question: private Replace parseReplace ( ) { Replace command = new Replace ( session ) ; currentPrepared = command ; read ( "INTO" ) ; Table table = readTableOrView ( ) ; command . setTable ( table ) ; if ( readIf ( "(" ) ) { if ( isSelect ( ) ) { command . setQuery ( parseSelect ( ) ) ; read ( ")" ) ; return command ; } Column [ ] columns = parseColumnList ( table ) ; command . setColumns ( columns ) ; } if ( readIf ( "VALUES" ) ) { do { ArrayList < Expression > values = New . arrayList ( ) ; read ( "(" ) ; if ( ! readIf ( ")" ) ) { do { if ( readIf ( "DEFAULT" ) ) { values . add ( null ) ; } else { values . add ( readExpression ( ) ) ; } } while ( readIfMore ( ) ) ; } command . addRow ( values . toArray ( new Expression [ values . size ( ) ] ) ) ; } while ( readIf ( "," ) ) ; } else { command . setQuery ( parseSelect ( ) ) ; } return command ; }
target:  MySQL compatibility. REPLACE is similar to MERGE.