Syntax
Parameters
Parameter | Description | Type | Required |
---|
message | A string of characters, numbers, or a mix of both to print | String / Number | Yes |
Return values
Condition | Return Value |
---|
Command is successful | The message passed as a parameter |
Syntax or specified constraints are invalid | error |
Errors
Syntax Error
:
- Error Message:
(error) ERR wrong number of arguments for 'echo' command
- Occurs if the command is called with additional or fewer parameters than required
Example Usage
Valid usage
Invalid Usage
Conclusion
In DiceDB, the ECHO command accepts only one message string and prints it. If no message or more than one message is provided, it results in an error