Redis Data Types Cheat Sheet/Set one or more hash fields

Create or update hash fields.

Section: Hashes

Set one or more hash fields

bash
bash
HSET user:1 name Alice email alice@example.com

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Hashes
Get one hash field
Read one field from a hash.
OpenIn sheetbashsame section
Get multiple fields
Read several fields in one call.
OpenIn sheetbashsame section
Get all fields and values
Read the full hash.
OpenIn sheetbashsame section
List field names
Return all field names in a hash.
OpenIn sheetbashsame section
List field values
Return all values in a hash.
OpenIn sheetbashsame section
Count fields
Return how many fields exist.
OpenIn sheetbashsame section