I create a table in database and enter some data into table.But i want to delete data from table manually but there are no option on phpMyAdmin.
Asked
Active
Viewed 1.2k times
2
-
1@nhasan Did you create unique/primary keys on the table? – Rahi Jan 17 '17 at 20:07
-
@Rahi no, i didn't. – imnhasan Jan 17 '17 at 20:14
-
If you scroll up just a bit, what does the message say in green just above the SQL query? – Isaac Bennetch Jan 18 '17 at 02:17
2 Answers
6
You need creating a primary key in phpMyAdmin to be able to delete rows.
If there isn't a field that can be used as a primary key, you can add an 'id' column with autoincrement, or you can use multiple columns primary key. You can go to Structure menu to add the key. After defining primary key, phpMyAdmin can manage deletion, but this is a phpMyAdmin issue, not a MySQL one. In fact you could delete a row by ad hoc sql query.

IgrewupwithSlackware
- 651
- 4
- 13
-
2For clarity's sake, any unique key will do — it doesn't have to be a primary key. – Isaac Bennetch Jan 18 '17 at 02:19
0
You may try to use the "SQL" tab, and then delete the rows by executing a query like this:
DELETE FROM FORM WHERE sf_phone = 0
This is just an example, you can custumize the query as you want.
On the other hand, if you want to use the wizzard from phpmyadmin, you have to add a primary key to the table.

Dharman
- 30,962
- 25
- 85
- 135

Alejandro Sanchez
- 79
- 1
- 11