fruits containing apple, banana, and cherry, what is the output of SISMEMBER fruits banana?SISMEMBER fruits banana
The command SISMEMBER fruits banana checks if banana is a member of the set fruits. Since banana is in the set, it returns 1.
SISMEMBER fruits orange if the set fruits contains apple, banana, and cherry?SISMEMBER fruits orange
The command SISMEMBER fruits orange checks if orange is in the set fruits. Since it is not, the command returns 0.
Option A is missing the member argument. The correct syntax is SISMEMBER <key> <member>. Without the member, Redis returns a syntax error.
SISMEMBER colors red if the set colors does not exist in Redis?SISMEMBER colors red
If the set colors does not exist, Redis treats it as an empty set. Checking membership returns 0 because red is not a member.
The SISMEMBER command returns 1 if the member is in the set, 0 if the member is not in the set, and also 0 if the set does not exist (treated as empty). It never returns nil or errors for non-existing sets.
