Syntax

SET parameter_name { TO | = } { value | 'value' | DEFAULT};

Parameters

Parameter or clauseDescription
parameter_nameName of the runtime parameters.
valueNew value of parameter. Values can be specified as string constants, identifiers, numbers, or comma-separated lists of these, as appropriate for the particular parameter. DEFAULT can be written to specify resetting the parameter to its default value (that is, whatever value it would have had if no SET had been executed in the current session).

Special case

In addition to standard parameter settings, RisingWave supports switching databases during an active session using either SET DATABASE TO or USE. Both commands allow you to change the current database without disconnecting and reconnecting.

Example
-- Switch database using SET DATABASE TO 
SET DATABASE TO sales_db;

-- Switch database using USE
USE marketing_db;