设为首页 加入收藏

TOP

Redis Hash类型数据常用命令总结(二)
2014-11-23 20:17:13 来源: 作者: 【 】 浏览:32
Tags:Redis Hash 类型 数据 常用 命令 总结
.0.1:6379> hincrby product price -100
(integer) 3300 # price减去100
11,hdel 命令:
hdel [...] 删除hash表中key的一个或者多个域的值。如果指定的field不存在,则忽略操作。
[plain]
redis 127.0.0.1:6379> hgetall product
1) "name"
2) "computer"
3) "price"
4) "3300"
5) "size"
6) "14inch"
7) "final"
8) "3200"
redis 127.0.0.1:6379> hdel product size
(integer) 1
redis 127.0.0.1:6379> hgetall product
1) "name"
2) "computer"
3) "price"
4) "3300"
5) "final"
6) "3200"
redis 127.0.0.1:6379> hdel product final price
(integer) 2
redis 127.0.0.1:6379> hgetall product
1) "name"
2) "computer"
首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇事物的隔离级别isolation 下一篇Redis String类型数据常用的16条..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: