import Since from '@components/shared/Since.astro' import RailroadDiagram from '@components/RailroadDiagram.astro' import Tabs from '@components/Tabs/Tabs.astro' import TabItem from '@components/Tabs/TabItem.astro'

ALTER PARAM statement

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

Statement syntax

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.

Example usage

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"