📄 insert.out
字号:
insert into t1 values;ERROR 42X80: VALUES clause must contain at least one element. Empty elements are not allowed. ij> -- Too many values in values clauseinsert into t1 values(1,1,1);ERROR 42802: The number of values assigned is not the same as the number of specified or implied columns.ij> -- insert select with too many result columns in selectinsert into t1 select 1, 2, 3 from t2;ERROR 42802: The number of values assigned is not the same as the number of specified or implied columns.ij> -- multiple instances of same column in colum listinsert into t1 (i, i) values(2,2);ERROR 42X13: Column name 'I' appears more than once times in the column list of an INSERT statement. ij> -- target column list size != source sizeinsert into t1 (i, j) values(1);ERROR 42802: The number of values assigned is not the same as the number of specified or implied columns.ij> insert into t1 (i) values (1, 2);ERROR 42802: The number of values assigned is not the same as the number of specified or implied columns.ij> -- Negative test cases - column name not specifiedinsert into t1 select 666 from t2;ERROR 42802: The number of values assigned is not the same as the number of specified or implied columns.ij> -- target table in source - deferred modeinsert into t1 values (1,1);1 row inserted/updated/deletedij> insert into t1 values (2,2);1 row inserted/updated/deletedij> delete from t2;2 rows inserted/updated/deletedij> insert into t2 select * from t1;2 rows inserted/updated/deletedij> autocommit off;ij> select * from t1;I |J -----------------------1 |1 2 |2 ij> insert into t1 select t1.* from t1, t2;4 rows inserted/updated/deletedij> select * from t1 order by 1, 2;I |J -----------------------1 |1 1 |1 1 |1 2 |2 2 |2 2 |2 ij> rollback;ij> insert into t1 (i) select (select i from t1 where i = 1) from t2;2 rows inserted/updated/deletedij> select * from t1;I |J -----------------------1 |1 2 |2 1 |NULL 1 |NULL ij> rollback;ij> insert into t1 (i) select 1 from t2 where 1 = (select i from t1 where i = 1);2 rows inserted/updated/deletedij> select * from t1;I |J -----------------------1 |1 2 |2 1 |NULL 1 |NULL ij> rollback;ij> insert into t1 select * from (select * from t1) a;2 rows inserted/updated/deletedij> select * from t1;I |J -----------------------1 |1 2 |2 1 |1 2 |2 ij> rollback;ij> -- bug 5638insert into t1 select * from t2 union select * from t1;2 rows inserted/updated/deletedij> select * from t1;I |J -----------------------1 |1 2 |2 1 |1 2 |2 ij> rollback;ij> -- bug 5638insert into t1 select * from t2 union select * from (select * from t1) a;2 rows inserted/updated/deletedij> select * from t1;I |J -----------------------1 |1 2 |2 1 |1 2 |2 ij> rollback;ij> -- single-row deferred insertinsert into t1 select * from t1 where i = 1;1 row inserted/updated/deletedij> select * from t1;I |J
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -