<h2><a name="Commands operating on sets">Commands operating on sets</a></h2><table><tr><td style="border: 1px solid #aaa; padding: 5px;"> <b>Command</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Parameters</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Description</b> </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SaddCommand.html">SADD</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Add the specified member to the Set value at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SremCommand.html">SREM</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Remove the specified member from the Set value at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SpopCommand.html">SPOP</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Remove and return (pop) a random element from the Set value at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SmoveCommand.html">SMOVE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>srckey</i> <i>dstkey</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Move the specified member from one Set to another atomically </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ScardCommand.html">SCARD</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the number of elements (the cardinality) of the Set at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SismemberCommand.html">SISMEMBER</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Test if the specified value is a member of the Set at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SinterCommand.html">SINTER</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key1</i> <i>key2</i> ... <i>keyN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the intersection between the Sets stored at key1, key2, ..., keyN </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SinterstoreCommand.html">SINTERSTORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>dstkey</i> <i>key1</i> <i>key2</i> ... <i>keyN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Compute the intersection between the Sets stored at key1, key2, ..., keyN, and store the resulting Set at dstkey </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SunionCommand.html">SUNION</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key1</i> <i>key2</i> ... <i>keyN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the union between the Sets stored at key1, key2, ..., keyN </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SunionstoreCommand.html">SUNIONSTORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>dstkey</i> <i>key1</i> <i>key2</i> ... <i>keyN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Compute the union between the Sets stored at key1, key2, ..., keyN, and store the resulting Set at dstkey </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SdiffCommand.html">SDIFF</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key1</i> <i>key2</i> ... <i>keyN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the difference between the Set stored at key1 and all the Sets key2, ..., keyN </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SdiffstoreCommand.html">SDIFFSTORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>dstkey</i> <i>key1</i> <i>key2</i> ... <i>keyN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Compute the difference between the Set key1 and all the Sets key2, ..., keyN, and store the resulting Set at dstkey </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SmembersCommand.html">SMEMBERS</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return all the members of the Set value at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SrandmemberCommand.html">SRANDMEMBER</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return a random member of the Set value at key </td></tr></table>
<h2><a name="Commands operating on sorted zsets (sorted sets)">Commands operating on sorted zsets (sorted sets)</a></h2><table><tr><td style="border: 1px solid #aaa; padding: 5px;"> <b>Command</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Parameters</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Description</b> </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZaddCommand.html">ZADD</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>score</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Add the specified member to the Sorted Set value at key or update the score if it already exist </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZremCommand.html">ZREM</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Remove the specified member from the Sorted Set value at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZincrbyCommand.html">ZINCRBY</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>increment</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> If the member already exists increment its score by <i>increment</i>, otherwise add the member setting <i>increment</i> as score </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZrankCommand.html">ZRANK</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the rank (or index) or <i>member</i> in the sorted set at <i>key</i>, with scores being ordered from low to high </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZrankCommand.html">ZREVRANK</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the rank (or index) or <i>member</i> in the sorted set at <i>key</i>, with scores being ordered from high to low </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZrangeCommand.html">ZRANGE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>start</i> <i>end</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return a range of elements from the sorted set at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZrangeCommand.html">ZREVRANGE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>start</i> <i>end</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return a range of elements from the sorted set at key, exactly like ZRANGE, but the sorted set is ordered in traversed in reverse order, from the greatest to the smallest score </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZrangebyscoreCommand.html">ZRANGEBYSCORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>min</i> <i>max</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return all the elements with score >= min and score <= max (a range query) from the sorted set </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZrangebyscoreCommand.html">ZCOUNT</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>min</i> <i>max</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the number of elements with score >= min and score <= max in the sorted set </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZcardCommand.html">ZCARD</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the cardinality (number of elements) of the sorted set at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZscoreCommand.html">ZSCORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>element</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the score associated with the specified element of the sorted set at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZremrangebyrankCommand.html">ZREMRANGEBYRANK</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>min</i> <i>max</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Remove all the elements with rank >= min and rank <= max from the sorted set </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZremrangebyscoreCommand.html">ZREMRANGEBYSCORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>min</i> <i>max</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Remove all the elements with score >= min and score <= max from the sorted set </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZunionstoreCommand.html">ZUNIONSTORE / ZINTERSTORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>dstkey</i> <i>N</i> <i>key1</i> ... <i>keyN</i> WEIGHTS <i>w1</i> ... <i>wN</i> AGGREGATE SUM|MIN|MAX </td><td style="border: 1px solid #aaa; padding: 5px;"> Perform a union or intersection over a number of sorted sets with optional weight and aggregate </td></tr></table>
<h2><a name="Commands operating on hashes">Commands operating on hashes</a></h2><table><tr><td style="border: 1px solid #aaa; padding: 5px;"> <b>Command</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Parameters</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Description</b> </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HsetCommand.html">HSET</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field</i> <i>value</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Set the hash field to the specified value. Creates the hash if needed. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HgetCommand.html">HGET</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Retrieve the value of the specified hash field. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HmgetCommand.html">HMGET</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field1</i> ... <i>fieldN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Get the hash values associated to the specified fields. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HmsetCommand.html">HMSET</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field1</i> <i>value1</i> ... <i>fieldN</i> <i>valueN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Set the hash fields to their respective values. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HincrbyCommand.html">HINCRBY</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field</i> <i>integer</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Increment the integer value of the hash at <i>key</i> on <i>field</i> with <i>integer</i>. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HexistsCommand.html">HEXISTS</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Test for existence of a specified field in a hash </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HdelCommand.html">HDEL</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Remove the specified field from a hash </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HlenCommand.html">HLEN</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the number of items in a hash. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HgetallCommand.html">HKEYS</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return all the fields in a hash. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HgetallCommand.html">HVALS</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return all the values in a hash. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HgetallCommand.html">HGETALL</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return all the fields and associated values in a hash. </td></tr></table>
<h2><a name="Commands operating on sets">Commands operating on sets</a></h2><table><tr><td style="border: 1px solid #aaa; padding: 5px;"> <b>Command</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Parameters</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Description</b> </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SaddCommand.html">SADD</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Add the specified member to the Set value at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SremCommand.html">SREM</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Remove the specified member from the Set value at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SpopCommand.html">SPOP</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Remove and return (pop) a random element from the Set value at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SmoveCommand.html">SMOVE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>srckey</i> <i>dstkey</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Move the specified member from one Set to another atomically </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ScardCommand.html">SCARD</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the number of elements (the cardinality) of the Set at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SismemberCommand.html">SISMEMBER</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Test if the specified value is a member of the Set at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SinterCommand.html">SINTER</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key1</i> <i>key2</i> ... <i>keyN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the intersection between the Sets stored at key1, key2, ..., keyN </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SinterstoreCommand.html">SINTERSTORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>dstkey</i> <i>key1</i> <i>key2</i> ... <i>keyN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Compute the intersection between the Sets stored at key1, key2, ..., keyN, and store the resulting Set at dstkey </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SunionCommand.html">SUNION</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key1</i> <i>key2</i> ... <i>keyN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the union between the Sets stored at key1, key2, ..., keyN </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SunionstoreCommand.html">SUNIONSTORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>dstkey</i> <i>key1</i> <i>key2</i> ... <i>keyN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Compute the union between the Sets stored at key1, key2, ..., keyN, and store the resulting Set at dstkey </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SdiffCommand.html">SDIFF</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key1</i> <i>key2</i> ... <i>keyN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the difference between the Set stored at key1 and all the Sets key2, ..., keyN </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SdiffstoreCommand.html">SDIFFSTORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>dstkey</i> <i>key1</i> <i>key2</i> ... <i>keyN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Compute the difference between the Set key1 and all the Sets key2, ..., keyN, and store the resulting Set at dstkey </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SmembersCommand.html">SMEMBERS</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return all the members of the Set value at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="SrandmemberCommand.html">SRANDMEMBER</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return a random member of the Set value at key </td></tr></table>
<h2><a name="Commands operating on sorted zsets (sorted sets)">Commands operating on sorted zsets (sorted sets)</a></h2><table><tr><td style="border: 1px solid #aaa; padding: 5px;"> <b>Command</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Parameters</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Description</b> </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZaddCommand.html">ZADD</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>score</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Add the specified member to the Sorted Set value at key or update the score if it already exist </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZremCommand.html">ZREM</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Remove the specified member from the Sorted Set value at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZincrbyCommand.html">ZINCRBY</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>increment</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> If the member already exists increment its score by <i>increment</i>, otherwise add the member setting <i>increment</i> as score </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZrankCommand.html">ZRANK</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the rank (or index) or <i>member</i> in the sorted set at <i>key</i>, with scores being ordered from low to high </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZrankCommand.html">ZREVRANK</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>member</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the rank (or index) or <i>member</i> in the sorted set at <i>key</i>, with scores being ordered from high to low </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZrangeCommand.html">ZRANGE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>start</i> <i>end</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return a range of elements from the sorted set at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZrangeCommand.html">ZREVRANGE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>start</i> <i>end</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return a range of elements from the sorted set at key, exactly like ZRANGE, but the sorted set is ordered in traversed in reverse order, from the greatest to the smallest score </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZrangebyscoreCommand.html">ZRANGEBYSCORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>min</i> <i>max</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return all the elements with score >= min and score <= max (a range query) from the sorted set </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZrangebyscoreCommand.html">ZCOUNT</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>min</i> <i>max</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the number of elements with score >= min and score <= max in the sorted set </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZcardCommand.html">ZCARD</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the cardinality (number of elements) of the sorted set at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZscoreCommand.html">ZSCORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>element</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the score associated with the specified element of the sorted set at key </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZremrangebyrankCommand.html">ZREMRANGEBYRANK</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>min</i> <i>max</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Remove all the elements with rank >= min and rank <= max from the sorted set </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZremrangebyscoreCommand.html">ZREMRANGEBYSCORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>min</i> <i>max</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Remove all the elements with score >= min and score <= max from the sorted set </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="ZunionstoreCommand.html">ZUNIONSTORE / ZINTERSTORE</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>dstkey</i> <i>N</i> <i>key1</i> ... <i>keyN</i> WEIGHTS <i>w1</i> ... <i>wN</i> AGGREGATE SUM|MIN|MAX </td><td style="border: 1px solid #aaa; padding: 5px;"> Perform a union or intersection over a number of sorted sets with optional weight and aggregate </td></tr></table>
<h2><a name="Commands operating on hashes">Commands operating on hashes</a></h2><table><tr><td style="border: 1px solid #aaa; padding: 5px;"> <b>Command</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Parameters</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Description</b> </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HsetCommand.html">HSET</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field</i> <i>value</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Set the hash field to the specified value. Creates the hash if needed. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HgetCommand.html">HGET</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Retrieve the value of the specified hash field. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HmgetCommand.html">HMGET</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field1</i> ... <i>fieldN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Get the hash values associated to the specified fields. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HmsetCommand.html">HMSET</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field1</i> <i>value1</i> ... <i>fieldN</i> <i>valueN</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Set the hash fields to their respective values. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HincrbyCommand.html">HINCRBY</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field</i> <i>integer</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Increment the integer value of the hash at <i>key</i> on <i>field</i> with <i>integer</i>. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HexistsCommand.html">HEXISTS</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Test for existence of a specified field in a hash </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HdelCommand.html">HDEL</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> <i>field</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Remove the specified field from a hash </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HlenCommand.html">HLEN</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return the number of items in a hash. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HgetallCommand.html">HKEYS</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return all the fields in a hash. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HgetallCommand.html">HVALS</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return all the values in a hash. </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> <a href="HgetallCommand.html">HGETALL</a> </td><td style="border: 1px solid #aaa; padding: 5px;"> <i>key</i> </td><td style="border: 1px solid #aaa; padding: 5px;"> Return all the fields and associated values in a hash. </td></tr></table>