mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
INSERT ... VALUES(DEFAULT)
This commit is contained in:
@@ -19,3 +19,29 @@ insert into t1 values (0,"mysql a");
|
||||
insert into t1 values (0,"r1manic");
|
||||
insert into t1 values (0,"r1man");
|
||||
drop table t1;
|
||||
create table t1 (a int not null auto_increment, primary key (a), t timestamp, c char(10) default "hello");
|
||||
insert into t1 values (default,default,default), (default,default,default), (4,0,"a"),(default,default,default);
|
||||
select a,t>0,c from t1;
|
||||
a t>0 c
|
||||
1 1 hello
|
||||
2 1 hello
|
||||
4 0 a
|
||||
5 1 hello
|
||||
truncate table t1;
|
||||
insert into t1 set a=default,t=default,c=default;
|
||||
insert into t1 set a=default,t=default,c=default;
|
||||
insert into t1 set a=4,t=0,c="a";
|
||||
insert into t1 set a=default,t=default,c=default;
|
||||
select a,t>0,c from t1;
|
||||
a t>0 c
|
||||
1 1 hello
|
||||
2 1 hello
|
||||
4 0 a
|
||||
5 1 hello
|
||||
drop table t1;
|
||||
drop database if exists foo;
|
||||
create database foo;
|
||||
use foo;
|
||||
create table t1 (c int);
|
||||
insert into foo.t1 set foo.t1.c = '1';
|
||||
drop database foo;
|
||||
|
||||
Reference in New Issue
Block a user