Important sql_mode Values
- The are several values, but these are the most important
sql_mode values:
ANSI
- This mode changes syntax and behavior to conform more closely to standard SQL.
STRICT_TRANS_TABLES
- If a value could not be inserted as given into a transactional table, abort the statement.
- For a non-transactional table, abort the statement if the value occurs in a single-row statement or the first row of a multiple-row statement.
TRADITIONAL
- Make MySQL behave like a "traditional" SQL database system.
- A simple description of this mode is "give an error instead of a warning" when inserting an incorrect value into a column.
INSERT and UPDATE abort as soon as the error is noticed.
- This may not be desired if using a non-transactional storage engine because data changes made prior to the error are not rolled back.
How do I set the default sql_mode value?
© 2007 John Michael Pierobon
Notes