shilps
shilps

Reputation:

error in running query

where h.er = select ( p.er from tip p where p.os = 'Android' OR 'iOS' ) AND h.ssn = (select h2.ssn  from persons h2 where h2.ssn like '213%');

I am performing this function in mysql. IT is not letting me to do it. An error is coming like check the manual the mysql version cooresponds to. I am using 5.1.5.1 MYsql

Upvotes: 1

Views: 71

Answers (2)

Sarfraz
Sarfraz

Reputation: 382909

Try replacing:

where p.os = 'Android' OR 'iOS' 

With:

where p.os = 'Android' OR p.os = 'iOS' 

Or:

where p.os IN ('Android', 'iOS')

Upvotes: 2

codaddict
codaddict

Reputation: 455460

Try putting the select inside the parenthesis as:

where h.er = ( select p.er fr...
             ^

Upvotes: 1

Related Questions