amitj Posted September 10, 2020 Share Posted September 10, 2020 Question: The following SQL statement returns TRUE and lists the product names if it finds ANY records in the OrderDetails table that quantity = 10 Answer by W3Schools.com SELECT ProductNameFROM ProductsWHERE ProductID = ANY (SELECT ProductID FROM OrderDetails WHERE Quantity = 10); which is wrong, as the result showing by above query is 31, but right answer will be 44 select productname, quantity from products inner join orderdetails on products.productid=orderdetails.productid and quantity=10 order by productname please verify and confirm. Link to comment Share on other sites More sharing options...
Sherin Posted October 2, 2020 Share Posted October 2, 2020 select Products.productId,Product.ProductName,Orderdetails.quantity from Products inner join Orderdetails on Products.productId=Orderdetails.productId where Orderdetails.quantity=10 Order By Products.ProductName I think this was is help for you Link to comment Share on other sites More sharing options...
kalyan Posted December 12, 2020 Share Posted December 12, 2020 full join is not working in mysql tool Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now