SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual540440-003
6-7
Column Default Settings
Column Default Settings
You can define specific default settings for columns when the table is created. The
CREATE TABLE statement defines the default settings for columns within tables. The
default setting for a column is the value inserted in a row when an INSERT statement
omits a value for a particular column.
Examples of Derived Column Names
These two examples show how to use names for derived columns.
The first example shows (EXPR) as the column heading of the SELECT result
table:
SELECT AVG (salary)
FROM persnl.employee;
(EXPR)
----------------
49441.52
--- 1 row(s) selected.
The second example shows AVERAGE SALARY as the column heading:
SELECT AVG (salary) AS "AVERAGE SALARY"
FROM persnl.employee;
"AVERAGE SALARY"
----------------
49441.52
--- 1 row(s) selected.