Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (2.6k points)

id_users    id_product    quantity    date

 11              21              1       2021

 11              21              1       2021

 20              23              1       2021

 15              37              1       2021

id_users and id_product are foreign keys from different tables.

What I want is to delete just one row:

11     21     1    2021

1 Answer

0 votes
by (7.2k points)

To delete a certain row from MySQL table with the same column values.

You need to  add a limit to the delete query

delete from orders 

where id_users = 11 and id_product = 21

limit 1

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...