0
update tbl_user set tbl_user.Zoneid='(Select tbl_timezone.Zoneid from tbl_timezone where tbl_timezone.timezone='[UTC - 4:30] Venezuelan Standard Time')' Where tbl_user.userid='1'
當我運行上面的查詢我得到這個錯誤查詢,在查詢內部在MySQL
您的SQL語法錯誤;檢查與您的MySQL服務器版本相對應的手冊,以找到在'[UTC - 4:30]委內瑞拉標準時間'附近使用的正確語法')'其中tbl_user.userid ='1'在第1行
但是當我執行
update tbl_user set tbl_user.Zoneid='10' Where tbl_user.userid='1';
然後正常工作
以下查詢的結果是10
Select tbl_timezone.Zoneid from tbl_timezone where tbl_timezone.timezone='[UTC - 4:30] Venezuelan Standard Time'
什麼錯我的第一個查詢。爲什麼我會收到錯誤