插入1時(shí),是插入的字符串還是數(shù)字
如果我往數(shù)據(jù)庫(kù)中插入數(shù)字?? 1, 插入的結(jié)果是:“1”還是 1? 當(dāng)用incr 是把“1”轉(zhuǎn)成數(shù)字之后累加,還是直接去加?
如果我往數(shù)據(jù)庫(kù)中插入數(shù)字?? 1, 插入的結(jié)果是:“1”還是 1? 當(dāng)用incr 是把“1”轉(zhuǎn)成數(shù)字之后累加,還是直接去加?
2017-09-11
舉報(bào)
2017-09-12
應(yīng)該是String,Redis中沒有整形和float類型。Redis都會(huì)將其作為String來處理,Redis官方給出的回答“Redis doesnot have a dedicated integer type. The string stored at the key is interpreted as a base-10 64 bit signed integer to execute the operation. ”