var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: WHERE...IN and EXISTS
I'm trying to understand the difference between EXISTS and WHERE...IN in SQL. Some articles that I've read suggest that WHERE...IN subqueries can be re-written as WHERE EXISTS.
I have the following query:
SELECT * FROM Customer, Appointment WHERE Appointment.CustomerCode = Customer.CustomerCode AND Appointment.ServerCode IN (SELECT ServerCode FROM Appointment WHERE CustomerCode = '102');
How would I rewrite this as a query using EXISTS instead of WHERE...IN?
Thanks for any help.
SELECT * FROM Customer, Appointment WHERE Appointment.CustomerCode = Customer.CustomerCode AND EXISTS ( SELECT 'hola' FROM Appointment WHERE ServerCode = Appointment.ServerCode AND CustomerCode = '102');
you talkin' to me? that sql conforms to SQL-2003
Originally Posted by
please check ANSI compliance for yourself, mister johnny-come-lately, before you dig up another ten-week-old thread to cast asparagus on my sql skillz0rz
Tags for this Thread