debug,

> is there any difference between:
> a)
>
> >>select lname, fname
> >>from person_tb, details_tb
> >>where mem_id = det_id
> >>and fin = "y";
>
> and
>
> b)
> select lname, fname
> from person_tb
> where mem_id in (select det_id from  details_tb where fin = "y")

Yes, the first does give error free output.  The second  says

ERROR 1064: You have an error in your SQL syntax.  Check the manual that 
corresponds to your MySQL server version for the right syntax to use near 
'select det_id from details_tb where fin = "y")' at line 3

> which one will execute faster ?

The first.

 Regards
      Trevor Rhodes
===========================================
Powered by Linux                -             Mandrake 9.2
Registered Linux user # 290542 at http://counter.li.org
Registered Machine #'s 186951
Mandrake Club Silver Member
Source :  my 100 % Microsoft-free personal computer.
===========================================
 16:10:15 up 38 min,  1 user,  load average: 1.00, 1.07, 1.06
-- 
Never mud wrestle with a pig.. you get dirty and the pig enjoys it!
Never try to teach a pig to dance. You waste your time and annoy the pig.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to