免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2015年4月4日 星期六

mysql sql-mode


//=== http://dev.mysql.com/doc/refman/5.1/en/replication-features-sql-mode.html

* For replication, you should always use the same server SQL mode on the master and on the slave.

* The default SQL mode is empty (no modes set).

* to set the SQL-mode when starting mysqld,
use the --sql-mode="mode1, mode2, ..." option on the command line, or
sql-mode="mode1, mode2, mode3, ..." in an option file such as my.cnf (Unix operating systems) or my.ini (Windows).

* To clear the SQL-mode explicitly, set it to an empty string using --sql-mode="" on the command line, or
sql-mode="" in an option file.


* To change the SQL mode at runtime, set the global or session sql_mode

SET GLOBAL sql_mode = 'modes';
SET SESSION sql_mode = 'modes';


* To determine the current global or session sql_mode value,

SELECT @@GLOBAL.sql_mode;
SELECT @@SESSION.sql_mode;


***
* Ansi
* STRICT_TRANS_TABLES
* Traditional


“strict mode”
--> means a mode with either or both STRICT_TRANS_TABLES or STRICT_ALL_TABLES enabled.


//=== http://dev.mysql.com/doc/refman/5.1/en/sql-mode.html#sql-mode-setting
Full List of SQL Modes

...


沒有留言:

張貼留言