Skip to main content

ZREM

Syntax

ZREM key member [member ...]

Module

sortedset

Categories

write fast sortedset

Description

Removes the listed members from the sorted set. Returns the number of elements removed.

Examples

Remove the listed members from the sorted set:

db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
deletedCount, err := db.ZRem("key", "member1", "member2")