Yes you are right it works... but if the documentation is wrong I will be wrong in the following also... Majority of SET statements are documented without quotes:
AUTOCOMMIT = {0 | 1} BIG_TABLES = {0 | 1} FOREIGN_KEY_CHECKS = {0 | 1} IDENTITY = value INSERT_ID = value LAST_INSERT_ID = value SQL_AUTO_IS_NULL = {0 | 1} SQL_BIG_SELECTS = {0 | 1} SQL_BUFFER_RESULT = {0 | 1} SQL_LOG_BIN = {0 | 1} SQL_LOG_OFF = {0 | 1} SQL_LOG_UPDATE = {0 | 1} SQL_QUOTE_SHOW_CREATE = {0 | 1} SQL_SAFE_UPDATES = {0 | 1} SQL_SELECT_LIMIT = {value | DEFAULT} SQL_WARNINGS = {0 | 1} TIMESTAMP = {timestamp_value | DEFAULT} UNIQUE_CHECKS = {0 | 1} Even the: CHARACTER SET {charset_name | DEFAULT} I'm not talking here about setting a string user variable without quotes... that would be absurd... but reaching to SET NAMES this one is the only one documented *WITH quotes*: NAMES {'charset_name' | DEFAULT} And also its pointed that with a note: > Note that the syntax for SET NAMES differs from that for setting most > other options. Also in the manual on chapter: *10.4. Connection Character Sets and Collations* there is written: > There are two statements that affect the connection character sets: > > SET NAMES '*charset_name*' > SET CHARACTER SET *charset_name* > > Again the SET NAMES with quotes anything else without ! So... dear writers of MySQL... or DOCs... what's the catch ? And... of course I'll use it with quotes ... until further notice ! -- Gabriel PREDA Senior Web Developer On 3/28/06, Adam i Agnieszka GÄ…siorowski FNORD <[EMAIL PROTECTED]> wrote: > > One must issue immediately after connection: > > SET NAMES 'utf8' > IMO, it is OK to say that without the quotes :-} {-: >