players with members and their scores, what will be the output of ZSCORE players "Alice" if Alice's score is 1500?ZADD players 1500 Alice ZSCORE players "Alice"
The ZSCORE command returns the score of the specified member as a string if the member exists in the sorted set. If the member does not exist, it returns nil.
ZSCORE players "Bob" but Bob is not in the sorted set, what will Redis return?ZADD players 1500 Alice ZSCORE players "Bob"
When the member does not exist in the sorted set, ZSCORE returns nil to indicate absence.
Redis stores and transmits data as strings to keep things simple and fast. Even numeric scores are sent as strings.
The correct syntax requires the sorted set name without quotes and the member name in quotes if it contains special characters or to be safe.
Redis does not support multiple members in one ZSCORE command. Running many commands separately causes many network calls. Using a Lua script batches calls inside Redis, reducing network overhead and improving performance.
