Jan 14, 2005 #1 SFiend Programmer Jun 4, 2004 39 CZ SELECT I.* FROM Form F, Inp I WHERE F.Id LIKE $Id AND F.Id LIKE I.IdForm or SELECT I.* FROM Inp I, Form F WHERE I.IdForm LIKE $Id AND I.IdForm LIKE F.Id what do you think?
SELECT I.* FROM Form F, Inp I WHERE F.Id LIKE $Id AND F.Id LIKE I.IdForm or SELECT I.* FROM Inp I, Form F WHERE I.IdForm LIKE $Id AND I.IdForm LIKE F.Id what do you think?
Jan 14, 2005 #2 r937 Technical User Jun 30, 2002 8,847 CA depends on whether there are indexes defined on those columns is this a trick question? F.Id LIKE I.IdForm is not the right way to join tables rudy | r937.com | Ask the Expert | Premium SQL Articles SQL for Database-Driven Web Sites (course starts January 9 2005) Upvote 0 Downvote
depends on whether there are indexes defined on those columns is this a trick question? F.Id LIKE I.IdForm is not the right way to join tables rudy | r937.com | Ask the Expert | Premium SQL Articles SQL for Database-Driven Web Sites (course starts January 9 2005)
Jan 14, 2005 Thread starter #3 SFiend Programmer Jun 4, 2004 39 CZ NO? I use it all the time I want to join tables. Is any faster solution? Upvote 0 Downvote
Jan 14, 2005 #4 r937 Technical User Jun 30, 2002 8,847 CA you could try F.Id = I.IdForm i'm not saying it will necessarily be faster, but it sure is easier to understand rudy | r937.com | Ask the Expert | Premium SQL Articles SQL for Database-Driven Web Sites (course starts January 9 2005) Upvote 0 Downvote
you could try F.Id = I.IdForm i'm not saying it will necessarily be faster, but it sure is easier to understand rudy | r937.com | Ask the Expert | Premium SQL Articles SQL for Database-Driven Web Sites (course starts January 9 2005)
Jan 14, 2005 #5 ericbrunson Technical User Jan 9, 2004 2,092 US I think the optimizer should understand that it's should use equality. Upvote 0 Downvote