Name
SET
Synopsis
SET OPTION SQL_OPTION=value
Defines an option for the current session. Values set by this statement are not in effect anywhere but the current connection, and they disappear at the end of the connection. The following options are current supported:
CHARACTER SET
charsetname
orDEFAULT
Changes the character set used by MySQL. Currently the only other built-in character set is
cp1251_koi8, which
refers to the Russian alphabet. SpecifyingDEFAULT
will return to the original character set.LAST_INSERT_ID
=number
Determines the value returned from the
LAST_INSERT_ID()
function.SQL_BIG_SELECTS
=0 or 1Determines the behavior when a large
SELECT
query is encountered. If set to 1, MySQL will abort the query with an error if the query would probably take too long to compute. MySQL decides that a query will take too long it will have to examine more rows than the value of themax_join_size
server variable. The default value is 0, which allows all queries.SQL_BIG_TABLES
=0 or 1Determines the behavior of temporary tables (usually generated when dealing with large data sets). If this value is 1, temporary tables are stored on disk, which is slower than primary memory but can prevent errors on systems with low memory. The default value is 0, which stores temporary tables in RAM.
SQL_LOG_OFF
=0 or 1When set to 1, turns off standard logging for the current session. This does not stop logging to the ISAM log or the update log. You must have
PROCESS LIST
privileges to use this option. The ...
Get MySQL and mSQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.