record
record Variables
Perform the following operations to create a record variable:
Define a record type and use this type to declare a variable.
Syntax
For the syntax of the record type, see Figure 1.
The syntax is described as follows:
- record_type: record name
- field: record columns
- datatype: record data type
- expression: expression for setting a default value
In GaussDB(DWS):
- When assigning values to record variables, you can:
- Declare a record type and define member variables of this type when you declare a function or stored procedure.
- Assign the value of a record variable to another record variable.
- Use SELECT INTO or FETCH to assign values to a record type.
- Assign the NULL value to a record variable.
- The INSERT and UPDATE statements cannot use a record variable to insert or update data.
- Just like a variable, a record column of the compound type does not have a default value in the declaration.
Examples
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.