000001 # skip this file if ms sql server 000002 onlyif mssql 000003 halt 000004 000005 # skip this file if oracle 000006 onlyif oracle 000007 halt 000008 000009 hash-threshold 8 000010 000011 statement ok 000012 CREATE TABLE t1( x INTEGER PRIMARY KEY, y VARCHAR(16) ) 000013 000014 statement ok 000015 INSERT INTO t1 VALUES(1, 'true') 000016 000017 statement ok 000018 INSERT INTO t1 VALUES(0, 'false') 000019 000020 000021 # EVIDENCE-OF: R-03421-22330 The REPLACE command is an alias for the 000022 # "INSERT OR REPLACE" variant of the INSERT command. 000023 000024 query IT rowsort 000025 SELECT x, y FROM t1 WHERE x=2 000026 ---- 000027 000028 statement ok 000029 INSERT INTO t1 VALUES(2, 'insert') 000030 000031 query IT rowsort 000032 SELECT x, y FROM t1 WHERE x=2 000033 ---- 000034 2 000035 insert 000036 000037 skipif mysql 000038 statement ok 000039 INSERT OR REPLACE INTO t1 VALUES(2, 'insert or replace') 000040 000041 skipif mysql 000042 query IT rowsort 000043 SELECT x, y FROM t1 WHERE x=2 000044 ---- 000045 2 000046 insert or replace 000047 000048 statement ok 000049 REPLACE INTO t1 VALUES(2, 'replace') 000050 000051 query IT rowsort 000052 SELECT x, y FROM t1 WHERE x=2 000053 ---- 000054 2 000055 replace 000056 000057 skipif mysql 000058 statement ok 000059 INSERT OR REPLACE INTO t1 VALUES(3, 'insert or replace (new)') 000060 000061 skipif mysql 000062 query IT rowsort 000063 SELECT x, y FROM t1 WHERE x=3 000064 ---- 000065 3 000066 insert or replace (new) 000067 000068 statement ok 000069 REPLACE INTO t1 VALUES(4, 'replace (new)') 000070 000071 query IT rowsort 000072 SELECT x, y FROM t1 WHERE x=4 000073 ---- 000074 4 000075 replace (new)