How to delete one row in mysql?

I have mysql database in that i have below table values.

mysql> select * from account_external_ids where external_id like "%rajesh.m%";
+------------+-----------------------+----------+----------------------------------------------------------+
| account_id | email_address         | password | external_id                                              |
+------------+-----------------------+----------+----------------------------------------------------------+
|          1 | rajesh.m@company.com | NULL      | gerrit:rajesh.m                                          |
|          1 | rajesh.m@company.com | NULL      | http://160.155.187.158:8095/openidserver/users/rajesh.m  |
|          1 | NULL                 | NULL      | username:rajesh.m                                        |
+------------+-----------------------+----------+----------------------------------------------------------+
3 rows in set (0.00 sec)

I need to delete 1 | rajesh.m@company.com | NULL | http://160.155.187.158:8095/openidserver/users/rajesh.m row.

I’m worried to run delete from account_external_ids where account_id in (1); not sure whether it will delete first row.

Need advise in deletion.

>Solution :

You are trying to delete a row but not a column. You can delete the row with the following statement:

delete from account_external_ids where external_id =
“http://160.155.187.158:8095/openidserver/users/rajesh.m”;

Leave a Reply