A
A
asdasdqwe2021-11-26 17:30:08
SQL
asdasdqwe, 2021-11-26 17:30:08

Subquery returns more than 1 row?

returns error: subquery returns more than 1 row?

I don't know much about sql yet. where is the error here?

DELETE FROM Orders
WHERE ProductId=(SELECT Id FROM Products WHERE ProductName='Galaxy S8');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nozzy, 2021-11-26
@nozzy

DELETE FROM Orders
WHERE ProductId=(SELECT Id FROM Products WHERE ProductName='Galaxy S8' LIMIT 1);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question