Sunday, April 16, 2006

Overview of Server SQL Modes

One of the features that distinguishes MySQL 5 from it's predecessors is the increased ability to control how the server interprets SQL and how strict or relaxed it should behave towards errors. This is done by setting the server SQL mode.

Choosing an appropriate Server SQL Mode can be an important tool to ease the task of porting from database products like Oracle or Microsoft Sequal Server. Despite the terrific documentation on the MySQL Reference manual, I really felt the need to have some kind of quick reference around to make effective use of the server sql modes. So, I made up one myself:



Enjoy!

3 comments:

Anonymous said...

Thanks for this it certainly makes it easier to understand than the MySQL documentation. I've got a question - what does 'TRADITIONAL' mean though ? The documentation doesn't make it very clear - do you know ?

Anonymous said...

OK, ignore that last one I've just found the answer in another part of the relevant documentation ...

"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. Note: The INSERT/UPDATE aborts as soon as the error is noticed. This may not be what you want if you are using a non-transactional storage engine, because data changes made prior to the error are not be rolled back, resulting in a “partially done” update. (Added in MySQL 5.0.2)"

rpbouman said...

Richard,

glad you like it! I will be maintaining this chart in the wiki of MySQLForge. You can find it here.

DuckDB bag of tricks: Processing PGN chess games with DuckDB - Rolling up each game's lines into a single game row (6/6)

DuckDB bag of tricks is the banner I use on this blog to post my tips and tricks about DuckDB . This post is the sixth installment of a s...