func_default.result

来自「这是linux下运行的mysql软件包,可用于linux 下安装 php + m」· RESULT 代码 · 共 24 行

RESULT
24
字号
drop table if exists t1,t2;create table t1(str varchar(10) default 'def',strnull varchar(10),intg int default '10',rel double default '3.14');insert into t1 values ('','',0,0.0);select default(str), default(strnull), default(intg), default(rel) from t1;default(str)	default(strnull)	default(intg)	default(rel)def	NULL	10	3.14explain extended select default(str), default(strnull), default(intg), default(rel) from t1;id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	Warnings:Note	1003	select default(`test`.`t1`.`str`) AS `default(str)`,default(`test`.`t1`.`strnull`) AS `default(strnull)`,default(`test`.`t1`.`intg`) AS `default(intg)`,default(`test`.`t1`.`rel`) AS `default(rel)` from `test`.`t1`select * from t1 where str <> default(str);str	strnull	intg	rel		0	0explain select * from t1 where str <> default(str);id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	drop table t1;CREATE TABLE t1 (id int(11), s varchar(20));INSERT INTO t1 VALUES (1, 'one'), (2, 'two'), (3, 'three');SELECT s, 32 AS mi FROM t1 GROUP BY s HAVING DEFAULT(mi) IS NULL;ERROR HY000: Field 'mi' doesn't have a default valueDROP TABLE t1;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?