Why am I not able to update the column based on such condition which is not the primary key
I am trying to update the constituencies where the name matches the specific criteria as shown below, but the questions below show an error.
Error code 1064, SQL State 42000 : You have an error in your SQL syntax; To use nearby table constituencies, check the manual related to your MySQL server version for the correct syntax city_id = Where '1' is located. Name = "East Delhi" on line 1
Update table election areas city_id = '1' where the constituency. Name = "East Delhi"; Update table's constituencies: city_id = '1' where constituency Name = "south Delhi"; Update table's constituencies: city_id = '1' where constituency Name = "Delhi Sadar"; Update table's constituencies: city_id = '1' where constituency Name = "karol garden"; Update table table city_id = '1' where constituency. Name = "New Delhi"; Update table's constituencies: city_id = '1' where constituency Name = "external Delhi"; Update table's constituencies: city_id = '1' where constituency Name = "north east Delhi"; Update table's constituencies: city_id = '1' where constituency Name = "north west Delhi"; Update table sets city_id = '1' where constituency. Name = "west Delhi";
Is it necessary that the condition should be checked with the primary key?
Please put some light on the light above.
Try
Set up the updated areas by city_id = 1 Where constituency Name = "East Delhi";
You do not need to write table in your mysql query.
Comments
Post a Comment