• Start

Statements

/

ALTER

ALTER PARAM

The ALTER statement can be used to change authentication access and behaviour, global parameters, table configurations, table events, schema definitions, and indexes.

Available since: v3.0.5

The ALTER PARAM statement can be used to modify an existing defined param.

SurrealQL Syntax
ALTER PARAM [ IF EXISTS ] $name
  [ VALUE @value ]
  [ COMMENT @string | DROP COMMENT ]
  [ PERMISSIONS [ NONE | FULL | WHERE @condition ] ]

Note that ALTER PARAM does not support DROP VALUE as a parameter without a value is not valid.

DEFINE PARAM $MODE VALUE "production" COMMENT "Don't use this param yet";

ALTER PARAM $MODE DROP COMMENT;

-- Check the statement
(INFO FOR DB).params.MODE;
Output: comment is gone
"DEFINE PARAM $MODE VALUE 'production' PERMISSIONS FULL"

Was this page helpful?