tag:blogger.com,1999:blog-8085117242240449595.post3769521100220120855..comments2023-12-21T05:46:31.718-05:00Comments on Muhammad Shujaat Siddiqi: IN Clause (SQL Server)Muhammad Shujaat Siddiqihttp://www.blogger.com/profile/02519138704633566929noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-8085117242240449595.post-78738220397334142512009-08-20T10:13:25.472-04:002009-08-20T10:13:25.472-04:00I agree. This is especially a problem when using...I agree. This is especially a problem when using compound indexes. I have only been able to get around it by concatenating the IDs together on both sides.Anonymoushttps://www.blogger.com/profile/09736468866131846942noreply@blogger.comtag:blogger.com,1999:blog-8085117242240449595.post-8707077130527339472009-03-26T04:10:00.000-04:002009-03-26T04:10:00.000-04:00I agree! I've though the same thing for ages.Limit...I agree! I've though the same thing for ages.<BR/>Limiting the IN clause to only one field prevents it from being used effectively for tables with composite keys.<BR/><BR/>You should also be able to say:<BR/>SELECT * FROM tblCustomers<BR/>WHERE (ID, Name) In ((1,'Smith'),<BR/>(53, 'Peterson'));<BR/>which is just a natural extension of the same principle.<BR/><BR/>I will whoever write SQL specs would get onto this.Autonomisthttps://www.blogger.com/profile/06452369286715833909noreply@blogger.com