Another SQL question
Ken Ray
kray at sonsothunder.com
Wed Feb 4 12:02:19 EST 2009
On 2/2/09 3:46 PM, "Bob Sneidar" <bobs at twft.com> wrote:
> Wow! Not in my reference manual it's not. 11.2 is "Numeric Types". But
> then I downloaded the PDF manual. Seems that it is either out of date
> or not "exactly" correct. I also searched for IN() in the manual and
> came up with squadouch.
That's why I always use the online manual...
http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html
The other thing to note is that "IN" can be used both for checking for
matching value in field(s) in another table with a "subselect", or even for
a simple string comparison.
For example, you can do this (this is admittedly a bad example because you
don't need to do the subselect, but it's more FYI):
SELECT * FROM People WHERE PhoneLink IN
(SELECT RecID FROM Phones WHERE PhoneType='Fax')
And you can also do this:
SELECT * FROM Phones WHERE PhoneType IN ('Fax','Work','Home')
etc.
The reason I mention this, is that when I first went to look for this a
while ago, I thought it would be under SELECT, but now I know better.
:-)
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list