This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
A query with a subquery in the WHERE clause returns the following error: Msg 512, Level 16, State 1, Line 17 Subquery returned more than 1 value. This isn't permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. What can we do to fix this error?
Make sure the subquery isn't using SELECT * in the SELECT list.
Change the operator introducing the subquery to IN or NOT IN
Add DISTINCT to the SELECT list
Which of the following statements is true of correlated subqueries?
A correlated subquery returns a single scalar value
A correlated subquery returns multiple columns and rows
A correlated subquery references a value in the outer query
You must answer all questions before checking your work.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?