Redis Common Commands (-)

Source: Internet
Author: User
Tags set set

1:get Bar View the value of the key bar

2:type Bar View key bar data type

3:del Bar Delete key

4:exists Bar Check if bar key exists

5:set Bar 1 Sets the value of the bar key to 1

6:keys * View all key values in Redis

The value of 7:INCR bar to the value of bar value plus 1.bar must be shaped.

8:incrby Bar 100 to the value of the key bar plus 100

9:DECR bar value reduced by 1

10:decrby Bar 100 to bar value reduced by 100

11:incrfloat Bar 1.1 Increases the value of bar by 1.1

12:append bar Hello such as bar value if is 1 after execution is 1bar.

13:strlen key Key The length of the value

14:mset K1 v1 K2 v2 Bulk set multiple key values

15:getbit key Offset bit operation

16:setbit Key offset value sets the binary value at the specified position

17:hset car Prince Hset command is a hash command indicating that the key to be created is a hash type

Similar to HashMap car in Java is the HASHMAP variable name Prince is the key of HashMap

18:hget car Prince similar to get hash value

19:hgetall car gets all the values of the hash based on car

20:hexists key fields are used to determine whether a field exists

21:hsetnx key field value does not exist for values execution. The value does not execute when it exists.

22:hincrby car Prince 100 to Prince plus 100

23:hdel key field Deletes a key

24:hkeys Key Gets the name of all fields

25:hvals key Gets the value of all fields

26:lpush key value adds an element to the left of the list, and the return value indicates the length of the list after the element is added

27:rpush key value to add an element to the right of the list, the return value indicates the length of the list after adding the element

28:lpop key pops the element from the left side of the list.

29:rpop key pops the element from the right side of the list.

30:llen Key gets the number of elements in the list. When key does not exist, it returns 0;

31:lrange Key start stop returns the element in the list. Element is returned from the following table, start to stop

32:lrem Key Count value deletes the specified number of elements for value

33:lindex key index based on subscript index visit list

34:lset key index value to modify the values of the list subscript index

35:ltrim Key start end deletes an element other than the specified index

36:linsert key Before|after value1 value2 to the list value is value1 before or after inserting a value of value2

37:rpoplpush List 1 List 2 Move the element from the right side of List 1 to the list 2

38:sadd key member[member ...] adds one or more elements to the collection. Do not join if the element already exists (the collection is the actual set set based on the Hashtable implementation)

39:srem Key member Delete member

40:smembers key gets the elements in the collection

41:sismember Key member determines whether the element member is in the collection

42:sdiff key [Key ...] Set of differences between sets

43:sinter key [key ...] computes the intersection between multiple collections

44:sunion key [Key ...] performs a set operation on multiple collections

45:scard key to get the number of elements in the collection

46:sdiffstore destination key [key ...] perform a set operation and store the result

47:sinterstore key [key ...] computes the intersection between multiple collections and stores the results

48:sunionstore key [Key ...] performs a set operation on multiple sets and stores the result

49:srandmember key [Count] is used to randomly fetch elements from the collection

50:spop key pops an element from the collection

51:zadd key score member added to the ordered collection

52:zscore key member gets the fraction of the element member

53:zrange key start end [with scores] gets ranked the results returned by some returned elements the size of the photo scores is arranged from small to large (start end refers to subscript)

54:zrevrange key start end [with scores] is the opposite of the result of the Zrange command. Results the size of the installation scores is arranged from large to small

55:zrangebyscore Key min Max [with scores] [limit offset count] takes the value of the fraction between Min max. different from Zrange. Zrange the value of the subscript between the start end

The 56:save command saves the current snapshot. will block other processes

The 57:BGSAVW command is also a save snapshot, which is saved through the background of the child process.

The 58:info command is used to view information about the Redis database.

59:monitor Monitoring of all redis command execution status



Redis Common Commands (-)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.