7 Replies
you can pass in the id of the specific dog you’d like to delete
so where dog is husky AND dogId is ….
you have to be more specific if you want the query to only delete 1 row
yeah but Id need to make a query first right?
No other way to do it with just one query rn?
well it depends, how are you getting to the point of I want to delete 1 dog
certainly that dog’s data will have everything necessary for us to delete it
if we so choose
um, im not sure what you mean
I just want to delete any dog of the given breed
Can I do better than this?:
if you want to delete just 1 dog without any thought into which dog gets deleted this is prob the best approach
Use subqueries
There's a PR that will implement
limit
in delete and update in MySQL and SQLite. This will be merged after this upcoming release