wwfc_barmy_army Posted May 20, 2011 Share Posted May 20, 2011 Hello, I just thought i'd check but i can't seem to find any information anywhere, Can you replace a query like this: SELECT * FROM tablename WHERE name = "name" OR name = "name2" OR name = "name3" with something like; SELECT * FROM tablename WHERE name = "name", "name2", "name3" or some shorthand way of having multiple where conditions on the same column? Thanks. Quote Link to comment Share on other sites More sharing options...
suresh_kamrushi Posted May 20, 2011 Share Posted May 20, 2011 You can do like this SELECT * FROM tablename WHERE name IN ("name", "name2", "name3") Thanks Quote Link to comment Share on other sites More sharing options...
wwfc_barmy_army Posted May 20, 2011 Author Share Posted May 20, 2011 Legend. Thanks. I'll give it a go Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.