2017-02-20 41 views
0

MySQL的代碼和MySQL版本5.5當我訪問日期使用partition.it數據庫顯示錯誤

SELECT * FROM employees1 PARTITION(p201701); 

錯誤:

Error Code : 1064 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 '(p201701)' at line 1

Execution Time : 00:00:00:000

Transfer Time : 00:00:00:000

Total Time : 00:00:00:000

回答

0
SELECT * FROM employees1 PARTITION (p201701); 

添加一個空格PARTITION

編輯:此語法僅適用於MySQL 5.6+。你的服務器是MySQL 5.5,這就是爲什麼它不工作

+1

以上查詢不工作 – sridhard

+0

看我編輯關於MySQL版本 – carmine