0
我想檢查幾個表是否被鎖定。我試圖做這樣說:如何檢查幾個表是否被鎖定?
SHOW OPEN TABLES WHERE (Table LIKE 'table_name' OR Table LIKE 'table2_name') AND In_use > 0
,但我發現錯誤
#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
'Table LIKE 'table_name' OR Table LIKE 'table2_name') AND In_use > 0' at line 1
我檢查了這一個正常工作:
SHOW OPEN TABLES WHERE In_use > 0 LIKE "table_name"
,但我需要檢查它的幾個表,我想這樣做只是使用一個查詢。我使用MySQL版本5.5.24
不,這是行不通的。 – Blood 2012-08-10 13:24:44
奇怪的是,當我使用你的SQL和我的工作時,我得到了同樣的錯誤。你有沒有再次得到同樣的錯誤? – ygram 2012-08-10 13:30:06
哦,沒錯。它的工作原理:D洛爾茲,謝謝。 – Blood 2012-08-10 13:36:57