MySQL:尝试从表中删除时出现语法错误

时间:2015-06-30 23:41:22

标签: mysql syntax delete-row

所以我正在尝试运行以下代码,以便在客户ID为100时从表中删除记录

[Err] 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 'JOIN account ON workoutplan.Account_Username = account.Username
JOIN customer O' at line 2

但是我收到以下错误

#!/bin/zsh
NAME=$(basename $1 .png); DIR="$NAME.iconset"
mkdir -pv $DIR
for m r in 'n' '' '((n+1))' '@2x'; do
    for n in $(seq 4 9 | grep -v 6); do
        p=$((2**$m)); q=$((2**$n))
        OUT="$DIR/icon_${q}x${q}${r}.png"
        sips -z $p $p $1 --out $OUT
    done
done
iconutil -c icns $DIR
rm -frv $DIR

1 个答案:

答案 0 :(得分:3)

DELETE workoutplan 
FROM   workoutplan w 
       JOIN account 
         ON w.account_username = account.username 
       JOIN customer 
         ON account.customer_idcustomer = customer.idcustomer
WHERE  customer_idcustomer = 100