![]() |
|
![]() | ||
|
Subject:
Unable to Delete records using delete statment in Mysql
Category: Computers > Software Asked by: twity-ga List Price: $2.00 |
Posted:
24 Sep 2002 14:27 PDT
Expires: 24 Oct 2002 14:27 PDT Question ID: 68591 |
I'm trying to delete some rows from a table mysql> desc Image; +-----------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------+------------------+------+-----+---------+----------------+ | ID | int(10) unsigned | | PRI | 0 | auto_increment | | NoPages | int(11) | | | 0 | | | +-----------+------------------+------+-----+---------+----------------+ 2 rows in set (0.00 sec) mysql> select ID from Image; +-----+ | ID | +-----+ | 1 | | 2 | | 44 | | 74 | | 75 | | 76 | | 77 | | 79 | | 80 | | 95 | | 109 | | 110 | +-----+ 12 rows in set (0.01 sec) mysql> delete from Image where ID > 3; Query OK, 0 rows affected (0.00 sec) mysql> select ID from Image; +-----+ | ID | +-----+ | 1 | | 2 | | 44 | | 74 | | 75 | | 76 | | 77 | | 79 | | 80 | | 95 | | 109 | | 110 | +-----+ 12 rows in set (0.01 sec) Eventhough I have deleted, records are still in the table |
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: Unable to Delete records using delete statment in Mysql
From: tony_l-ga on 24 Sep 2002 15:04 PDT |
Try using quotes to make 3 explicit, i.e. delete from Image where ID > '3'; it also might be delete from Image where ID > "3"; I'm not sure of the syntax |
Subject:
Re: Unable to Delete records using delete statment in Mysql
From: patangay-ga on 24 Sep 2002 18:06 PDT |
have you tried specific ID's? does that work? like where ID = 2. The 3 should work normally, I'm just trying to figure out if you have enough access privs to the database itself. |
Subject:
Re: Unable to Delete records using delete statment in Mysql
From: twity-ga on 25 Sep 2002 06:50 PDT |
Hi, I really appreciate your help, but i tryied all the possible ways it didn't work, the following is what i did ------------------------------------------------------------------- delete from Image where id = 44; Query OK, 0 rows affected (0.03 sec) mysql> select id from Image where id = 44; Empty set (0.00 sec) mysql> select id from Image where id > 3; +-----+ | id | +-----+ | 44 | | 74 | | 75 | | 76 | | 77 | | 79 | | 80 | | 95 | | 109 | | 110 | | 110 | +-----+ 12 rows in set (0.01 sec) mysql> delete from Image where id = "44"; Query OK, 0 rows affected (0.00 sec) mysql> select id from Image where id = 44; Empty set (0.00 sec) mysql> select id from Image where id > 3; +-----+ | id | +-----+ | 44 | | 74 | | 75 | | 76 | | 77 | | 79 | | 80 | | 95 | | 109 | | 110 | +-----+ 12 rows in set (0.01 sec) mysql> select id from Image where id = '44'; Empty set (0.00 sec) mysql> select id from Image where id ='44'; Empty set (0.00 sec) mysql> select id from Image where id =44; Empty set (0.01 sec) mysql> select id from Image where id > 3; +-----+ | id | +-----+ | 44 | | 74 | | 75 | | 76 | | 77 | | 79 | | 80 | | 95 | | 109 | | 110 | +-----+ 12 rows in set (0.01 sec) |
Subject:
Re: Unable to Delete records using delete statment in Mysql
From: tierrie-ga on 25 Sep 2002 17:44 PDT |
Your syntax is correct - you probably have insufficient privileges to delete entries from the table. |
Subject:
Re: Unable to Delete records using delete statment in Mysql
From: webadept-ga on 05 Oct 2002 21:53 PDT |
Hi, Did any of these comments answer your question? If so could you please let us know or close it, we would like to make sure that your quesion is answered, but don't want to offer a Researcher answer if you no longer need the research done. Thanks, webadept-ga |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |