Results 1 to 2 of 2

Thread: SQL

  1. #1
    Join Date
    Dec 1969

    Default SQL

    I know i can do field IN value but how do i do value IN field? Is that allow? I am using mySQL noe.

  2. #2
    Join Date
    Dec 1969

    Default I give up...

    ...what is "noe"??? I&#039;ve seen lots of contractions and abbreviations but that&#039;s a new one.<BR><BR>Anyway...<BR><BR>MySQL may not allow what you are trying.<BR><BR>How did you code it? I would have used<BR><BR>SELECT ... FROM tablename<BR>WHERE 17 IN ( fld1, fld2, fld3 )<BR><BR>But I certainly would not be surprised if it didn&#039;t work.<BR><BR>THe alternative is obvious:<BR><BR>SELECT ... FROM tablename<BR>WHERE fld1=17 OR fld2=17 OR fld3=17<BR><BR>(The value 17 was, of course, 100% arbitrary.)<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts