The ALTER statement can be used to change authentication access and behaviour, global parameters, table configurations, table events, schema definitions, and indexes.
The ALTER FIELD statement is used to change or entirely drop clauses of a defined field on a table.
As ALTER FIELD contains the same clauses available in a DEFINE FIELD statement, be sure to see that page for more examples.
Here is one example in which the name field is defined for a record user:
DEFINEFIELDnameONuserTYPEstring;
Later on, a database-wide parameter is defined to disallow certain user names. This can be followed up with an ALTER FIELD statement to add the ASSERT clause to it.
DEFINEPARAM$DISALLOWED_NAMESVALUE["Lord British", "Lord Blackthorn"]; ALTER FIELD name ON user ASSERT $value NOT IN$DISALLOWED_NAMES; CREATEuserSETname="Lord British";
Output
"Found 'Lord British' for field `name`, with record `user:yn4yttkg5w683q2937bq`, but field must conform to: $value NOTINSIDE $DISALLOWED_NAMES""