Server IP : 104.21.38.3 / Your IP : 162.158.106.162 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/suite/engines/funcs/r/ |
Upload File : |
DROP TABLE IF EXISTS t1; SET sql_mode='NO_ENGINE_SUBSTITUTION'; Warnings: Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release. CREATE TABLE t1(c1 TINYINT NOT NULL PRIMARY KEY, c2 TINYINT); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` tinyint(4) NOT NULL, `c2` tinyint(4) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` tinyint(4) NOT NULL, `c2` tinyint(4) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` tinyint(4) NOT NULL, `c2` tinyint(4), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 SMALLINT NOT NULL PRIMARY KEY, c2 SMALLINT); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` smallint(6) NOT NULL, `c2` smallint(6) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` smallint(6) NOT NULL, `c2` smallint(6) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` smallint(6) NOT NULL, `c2` smallint(6), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 MEDIUMINT); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` mediumint(9) NOT NULL, `c2` mediumint(9) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` mediumint(9) NOT NULL, `c2` mediumint(9) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` mediumint(9) NOT NULL, `c2` mediumint(9), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL, `c2` int(11) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL, `c2` int(11) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL, `c2` int(11), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL, `c2` int(11) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL, `c2` int(11) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL, `c2` int(11), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 BIGINT NOT NULL PRIMARY KEY, c2 BIGINT); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` bigint(20) NOT NULL, `c2` bigint(20) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` bigint(20) NOT NULL, `c2` bigint(20) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` bigint(20) NOT NULL, `c2` bigint(20), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 REAL NOT NULL PRIMARY KEY, c2 REAL); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` double NOT NULL, `c2` double DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` double NOT NULL, `c2` double DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` double NOT NULL, `c2` double, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 DOUBLE NOT NULL PRIMARY KEY, c2 DOUBLE); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` double NOT NULL, `c2` double DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` double NOT NULL, `c2` double DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` double NOT NULL, `c2` double, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 FLOAT NOT NULL PRIMARY KEY, c2 FLOAT); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` float NOT NULL, `c2` float DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` float NOT NULL, `c2` float DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` float NOT NULL, `c2` float, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 DECIMAL NOT NULL PRIMARY KEY, c2 DECIMAL); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` decimal(10,0) NOT NULL, `c2` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` decimal(10,0) NOT NULL, `c2` decimal(10,0) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` decimal(10,0) NOT NULL, `c2` decimal(10,0), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 NUMERIC NOT NULL PRIMARY KEY, c2 NUMERIC); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` decimal(10,0) NOT NULL, `c2` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` decimal(10,0) NOT NULL, `c2` decimal(10,0) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` decimal(10,0) NOT NULL, `c2` decimal(10,0), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 TINYINT NOT NULL PRIMARY KEY, c2 TINYINT); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` tinyint(4) NOT NULL, `c2` tinyint(4) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` tinyint(4) NOT NULL, `c2` tinyint(4) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` tinyint(4) NOT NULL, `c2` tinyint(4), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 SMALLINT NOT NULL PRIMARY KEY, c2 SMALLINT); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` smallint(6) NOT NULL, `c2` smallint(6) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` smallint(6) NOT NULL, `c2` smallint(6) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` smallint(6) NOT NULL, `c2` smallint(6), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 MEDIUMINT); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` mediumint(9) NOT NULL, `c2` mediumint(9) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` mediumint(9) NOT NULL, `c2` mediumint(9) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` mediumint(9) NOT NULL, `c2` mediumint(9), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 INT); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL, `c2` int(11) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL, `c2` int(11) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL, `c2` int(11), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL, `c2` int(11) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL, `c2` int(11) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL, `c2` int(11), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 BIGINT NOT NULL PRIMARY KEY, c2 BIGINT); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` bigint(20) NOT NULL, `c2` bigint(20) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` bigint(20) NOT NULL, `c2` bigint(20) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` bigint(20) NOT NULL, `c2` bigint(20), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 REAL NOT NULL PRIMARY KEY, c2 REAL); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` double NOT NULL, `c2` double DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` double NOT NULL, `c2` double DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` double NOT NULL, `c2` double, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 DOUBLE NOT NULL PRIMARY KEY, c2 DOUBLE); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` double NOT NULL, `c2` double DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` double NOT NULL, `c2` double DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` double NOT NULL, `c2` double, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 FLOAT NOT NULL PRIMARY KEY, c2 FLOAT); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` float NOT NULL, `c2` float DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` float NOT NULL, `c2` float DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` float NOT NULL, `c2` float, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 DECIMAL NOT NULL PRIMARY KEY, c2 DECIMAL); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` decimal(10,0) NOT NULL, `c2` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` decimal(10,0) NOT NULL, `c2` decimal(10,0) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` decimal(10,0) NOT NULL, `c2` decimal(10,0), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1(c1 NUMERIC NOT NULL PRIMARY KEY, c2 NUMERIC); SHOW TABLES; Tables_in_test t1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` decimal(10,0) NOT NULL, `c2` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 SET DEFAULT 10; INSERT INTO t1(c1) VALUES(1); SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` decimal(10,0) NOT NULL, `c2` decimal(10,0) DEFAULT '10', PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; INSERT INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; c1 c2 1 10 2 NULL SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` decimal(10,0) NOT NULL, `c2` decimal(10,0), PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 DROP TABLE t1; SHOW TABLES; Tables_in_test SET sql_mode=default;