2003-05-13 18:26:07 +02:00
|
|
|
drop table if exists t1;
|
2003-10-08 17:53:31 +02:00
|
|
|
set sql_mode="MySQL40";
|
|
|
|
select @@sql_mode;
|
|
|
|
@@sql_mode
|
2006-05-04 17:35:58 +02:00
|
|
|
MYSQL40,HIGH_NOT_PRECEDENCE
|
2003-10-08 17:53:31 +02:00
|
|
|
set @@sql_mode="ANSI";
|
|
|
|
select @@sql_mode;
|
|
|
|
@@sql_mode
|
2005-02-17 05:12:31 +01:00
|
|
|
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
|
2003-05-13 18:26:07 +02:00
|
|
|
SELECT 'A' || 'B';
|
|
|
|
'A' || 'B'
|
|
|
|
AB
|
|
|
|
CREATE TABLE t1 (id INT, id2 int);
|
|
|
|
SELECT id,NULL,1,1.1,'a' FROM t1 GROUP BY id;
|
|
|
|
id NULL 1 1.1 a
|
|
|
|
SELECT id FROM t1 GROUP BY id2;
|
2005-02-17 05:12:31 +01:00
|
|
|
id
|
2003-05-13 18:26:07 +02:00
|
|
|
drop table t1;
|
2003-10-08 17:53:31 +02:00
|
|
|
SET @@SQL_MODE="";
|
2006-05-01 20:30:09 +02:00
|
|
|
CREATE TABLE t1 (i int auto_increment NOT NULL, PRIMARY KEY (i));
|
|
|
|
SHOW CREATE TABLE t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TABLE `t1` (
|
2006-05-10 20:39:26 +02:00
|
|
|
`i` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
PRIMARY KEY (`i`)
|
2006-05-01 20:30:09 +02:00
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
|
|
|
SET @@SQL_MODE="MYSQL323";
|
|
|
|
SHOW CREATE TABLE t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TABLE `t1` (
|
2006-05-10 20:39:26 +02:00
|
|
|
`i` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
PRIMARY KEY (`i`)
|
2006-05-01 20:30:09 +02:00
|
|
|
) TYPE=MyISAM
|
|
|
|
SET @@SQL_MODE="MYSQL40";
|
|
|
|
SHOW CREATE TABLE t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TABLE `t1` (
|
2006-05-10 20:39:26 +02:00
|
|
|
`i` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
PRIMARY KEY (`i`)
|
2006-05-01 20:30:09 +02:00
|
|
|
) TYPE=MyISAM
|
|
|
|
SET @@SQL_MODE="NO_FIELD_OPTIONS";
|
|
|
|
SHOW CREATE TABLE t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TABLE `t1` (
|
|
|
|
`i` int(11) NOT NULL,
|
2006-05-10 20:39:26 +02:00
|
|
|
PRIMARY KEY (`i`)
|
2006-05-01 20:30:09 +02:00
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
|
|
|
DROP TABLE t1;
|