Skip to main content
edited tags
Link
Paul White
  • 90.3k
  • 30
  • 423
  • 663
added 43 characters in body
Source Link
Hannah Vernon
  • 70.5k
  • 22
  • 177
  • 321

This might be a silly question, and my suspicion is that I can't do this, but is there a construct in SQL that would allow me to do something like the following:

SELECT whatever WHERE col1,col2 IN ((val1, val2), (val1, val2), ...)

I want to select data where two columns are in a set of pairs. Thanks!

I'd like to avoid using a subquery, if possible.

This might be a silly question, and my suspicion is that I can't do this, but is there a construct in SQL that would allow me to do something like the following:

SELECT whatever WHERE col1,col2 IN ((val1, val2), (val1, val2), ...)

I want to select data where two columns are in a set of pairs. Thanks!

This might be a silly question, and my suspicion is that I can't do this, but is there a construct in SQL that would allow me to do something like the following:

SELECT whatever WHERE col1,col2 IN ((val1, val2), (val1, val2), ...)

I want to select data where two columns are in a set of pairs.

I'd like to avoid using a subquery, if possible.

Tweeted twitter.com/#!/StackDBAs/status/299323967431380992
correction
Source Link
RolandoMySQLDBA
  • 184.3k
  • 33
  • 323
  • 531

This might be a silly question, and my suspicion is that I can't do this, but is there a construct in SQL that would allow for me to do something like the following:

SELECT whatever WHERE col1,col2 IN ((val1, val2), (val1, val2), ...)

I want to select data where two columns are in a set of pairs. Thanks!

This might be a silly question, and my suspicion is that I can't do this, but is there a construct in SQL that would allow for me do something like the following:

SELECT whatever WHERE col1,col2 IN ((val1, val2), (val1, val2), ...)

I want to select data where two columns are in a set of pairs. Thanks!

This might be a silly question, and my suspicion is that I can't do this, but is there a construct in SQL that would allow me to do something like the following:

SELECT whatever WHERE col1,col2 IN ((val1, val2), (val1, val2), ...)

I want to select data where two columns are in a set of pairs. Thanks!

Source Link
James
  • 665
  • 1
  • 5
  • 7
Loading