Looking at Redis for a few days to summarize the data types and commands

Source: Internet
Author: User

Some basic commands

Open command line: REDIS-CLI

Display key Name: Keys * (You can use the wildcard character *,?) , [],\ escaped]

(1) Character type

1.1 Assignment and Value: Set key value, get key

such as: Set name WL, get name display WL

1.2 Increment number: INCR key

such as; incr age if you keep executing this command, age will add 1 each time.

1.3 Add the specified integer: Incrby key Step value

Example: Incrby score 2 increase each time 2

1.4 Decrease number (specified integer): Decr key, Decrby key step value

such as: DECR age, Decrby score 2

1.5 increasing the specified floating point number: Incrbyfloat key step value (floating point type)

Example: Incrbyfloat score 2.33

1.6 Append value to tail: Append key value

such as: Append name haha display Wlhaha

Looking at Redis for a few days to summarize the data types and 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.