Wednesday, January 22, 2014

MySQL server version for the right syntax to use near OPTION SQL_SELECT_LIMIT

mysql> select VERSION();
+--------------+
| VERSION()    |
+--------------+
| 5.6.13-log |
+--------------+
1 row in set (0.00 sec)

mysql> SET OPTION SQL_SELECT_LIMIT=10;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=10' at line 1


mysql>  select VERSION();
+------------+
| VERSION()  |
+------------+
| 5.5.11     |
+------------+
1 row in set (0.00 sec)

mysql> SET OPTION SQL_SELECT_LIMIT=10;
Query OK, 0 rows affected (0.00 sec)Older versions of MySQL employed SET OPTION, but this syntax is   deprecated in favor of SET without OPTION.

You should just use SET SQL_SELECT_LIMIT=10; instead.
Incompatible Change: The obsolete OPTION modifier for the SET   statement has been removed.

2 comments:

Create MongoDB service in Windows OS

1) Open Command Prompt 2) Create directory for Database and Logs                    mkdir c:\data\db                     mkdir c:\...