Diskusi Mohammad Zakaria

Selesai
Mohammad Zakaria
Ditanyakan pada: Mengubah Data Yang Ada - Update

error msql command WHERE command

saya mengalami kendala saat menggunakan where terdapat syntax error padahal sudah saya cocokan dengan video mysql> SELECT * FROM customers; +----+--------+-------------+-----------+ | id | name | city | country | +----+--------+-------------+-----------+ | 1 | andika | malang | indonesia | | 2 | koko | kawi | indonesia | | 3 | diki | dampit | indonesia | | 4 | fitrah | probolinggo | indonesia | | 5 | yuda | proboliggon | indonesia | | 6 | ageng | jombang | indonesia | | 7 | kujang | pare | indonesia | +----+--------+-------------+-----------+ 7 rows in set (0,00 sec) mysql> UPDATE customers; ERROR 1064 (42000): 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 '' at line 1 mysql> UPDATE customers -> SET name='bagas', -> WHERE id = 7; ERROR 1064 (42000): 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 id = 7' at line 3 mysql> UPDATE customers SET name='bagas', city='kediri', WHERE id = 7; ERROR 1064 (42000): 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 id = 7' at line 1 mysql> UPDATE customers SET name='bagas', city='kediri', WHERE id = '7'; ERROR 1064 (42000): 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 id = '7'' at line 1 mysql> UPDATE customers SET name='bagas', city='kediri', WHERE id = `7`; ERROR 1064 (42000): 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 id = `7`' at line 1 mysql> UPDATE customers SET name='bagas', city='kediri', WHERE name = 'kujang'; ERROR 1064 (42000): 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 name = 'kujang'' at line 1 mysql> ^C mysql>

1 Jawaban

Avatar
Mohammad Zakaria

13 hari yang lalu

Jawaban Terpilih

Ternyata hanya kelebihan ' , ' :'