Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Common commands of redis

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Redis > SET db_number 0 # defaults to database 0 OKredis > SELECT 1 # uses database 1 OKredis [1] > GET db_number # has been switched to database 1 Notice that Redis now has an extra [1] (nil) redis [1] > SET db_number 1OKredis [1] > GET db_number "1" redis [1] > SELECT 3 #, and then switch to database 3 OKredis [3] > # prompt has changed from [1] to [3] here > [1] [3] the number in parentheses is the number of the library. Do not need the command query 172.18.22.101 key 7002 > dbsize # return the number of current database key (integer) 1flushdb delete all keyflushall in the currently selected database delete so all keymove key7 2 in the database move key7 to database 2 to keys * view all key

Reference: https://blog.csdn.net/qq_40550973/article/details/80822519

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report