tag:blogger.com,1999:blog-5005148102632656774.post7647093340408432926..comments2023-02-05T07:06:17.920-08:00Comments on Sybase Database Interview Questions and Answers: Q 7Sumedhhttp://www.blogger.com/profile/11533458660230230361noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-5005148102632656774.post-15904954413481943072008-08-25T06:51:00.000-07:002008-08-25T06:51:00.000-07:00I find the query posted as an answer to the treaty...I find the query posted as an answer to the treaty question to be quite odd. I don't recall ever seeing an IN clause subquery that correlates on the column the IN clause is matching. I hope I don't see another one any time soon. With the correlation it could have been an equality test, rather than an IN clause, particularly since the column returned is the key to the table. Or better yet just write it as an EXISTS test. Or as a JOIN for that matter, since the join would be on the key to the table in the subquery.rmharveyhttps://www.blogger.com/profile/17819502327298247865noreply@blogger.com