# skip this file if ms sql server
onlyif mssql
halt

# skip this file if oracle
onlyif oracle
halt

hash-threshold 8

statement ok
CREATE TABLE t1( x INTEGER PRIMARY KEY, y VARCHAR(16) )

statement ok
INSERT INTO t1 VALUES(1, 'true')

statement ok
INSERT INTO t1 VALUES(0, 'false')


# EVIDENCE-OF: R-03421-22330 The REPLACE command is an alias for the
# "INSERT OR REPLACE" variant of the INSERT command.

query IT rowsort
SELECT x, y FROM t1 WHERE x=2
----

statement ok
INSERT INTO t1 VALUES(2, 'insert')

query IT rowsort
SELECT x, y FROM t1 WHERE x=2
----
2
insert

skipif mysql
statement ok
INSERT OR REPLACE INTO t1 VALUES(2, 'insert or replace')

skipif mysql
query IT rowsort
SELECT x, y FROM t1 WHERE x=2
----
2
insert or replace

statement ok
REPLACE INTO t1 VALUES(2, 'replace')

query IT rowsort
SELECT x, y FROM t1 WHERE x=2
----
2
replace

skipif mysql
statement ok
INSERT OR REPLACE INTO t1 VALUES(3, 'insert or replace (new)')

skipif mysql
query IT rowsort
SELECT x, y FROM t1 WHERE x=3
----
3
insert or replace (new)

statement ok
REPLACE INTO t1 VALUES(4, 'replace (new)')

query IT rowsort
SELECT x, y FROM t1 WHERE x=4
----
4
replace (new)
