0
我正在寫一個小的bash腳本來通過ssh連接一個數據庫表的隨機樣本。在ssh裏面的bash中,用參數進行MySQL查詢
ssh $SERVER 'mysql -e "SELECT * FROM ${TABLE} WHERE RAND() < ${PROBABILITY} LIMIT ${LIMIT}" -uroot -p ${DATABASE} > temp_dump_file.sql'
我無法獲取要解釋的參數。錯誤是:
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 'WHERE RAND() < LIMIT' at line 1
感謝提前:)
就是這樣。謝謝 :) – mlg