views:

17

answers:

2
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

+1  A: 

Try putting the select inside the parenthesis as:

where h.er = ( select p.er fr...
             ^
codaddict
it is showing me empty set..1 warning. I have all the data in the files
shilps
its showing the syntax error by saying the syntax is not corresponding to mysql version
shilps
can u give me your email id? I cant post my query here as some body else can copy it from here.Its is a Hw.
shilps
u there codaddict?
shilps
+2  A: 

Try replacing:

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

With:

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

Or:

where p.os IN ('Android', 'iOS')
Sarfraz
+1 Good catch..
codaddict
thanks, bt it is not working either. I used the last sentence of yours.Are they based on mysql version?
shilps
hey Sarfraz...r u there?
shilps