SQL/MX 3.1 Installation and Management Guide (H06.23+, J06.12+)
Creating an SQL/MX Database
HP NonStop SQL/MX Release 3.1 Installation and Management Guide—663852-001
7-23
Managing Table Data
delimited names are. For more information about SQL identifiers and SQL/MX
reserved words, see the SQL/MX Reference Manual.
Use descriptive column names for your application to help programmers and users
remember the names correctly.
Nondelimited column names can be specified in the CREATE TABLE statement in
any combination of uppercase and lowercase letters. For example, these three
column names are equivalent: LOCATION, Location, and location.
Specifying Data Types for Columns
Each column in a table is associated with a data type. These basic formats of data can
be stored in columns:
Character data
Numeric data
Datetime data
Time interval data
When determining the data type and attributes for a column, consider these guidelines:
NonStop SQL/MX supports the ISO88591 character set and several other
character sets for character data. For more information, see Defining Character
Data on page 7-25.
Specify a column default value for each column. See Using Default and Null Values
on page 7-30.
Specify the HEADING and UPSHIFT attributes for your application’s use, if
applicable. For more information, see Specifying Column Attributes on page 7-32.
Collation of numeric values occurs with negative numbers preceding positive
numbers.
For the purpose of sorting, the null value is considered to be greater than all other
values.
For compatibility of SQL/MX data types, two data types are comparable if a value
of one data type can be compared to a value of another data type. Two data types
are compatible if a value of one data type can be assigned to a column of the other
data type. Compatible data types are also comparable.
Any numeric data type can be compared with all other numeric data types in DML
comparison expressions. Character strings can be compared only if they are of the
same character set. Character strings and numeric data types are not compatible
with each other and cannot be compared directly by NonStop SQL/MX. For more
information, see the SQL/MX Reference Manual.
You cannot use a datetime data type with SQL/MX data types other than interval in
arithmetic expressions or comparisons. Interval values can be multiplied or divided
by scalar data types and added to or subtracted from datetime data types.










