Github user traflm commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/895#discussion_r93874161
--- Diff:
docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc ---
@@ -137,6 +137,74 @@ You can define specific default settings for columns
when the table is created.
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.
+<<<
+[[identity_columns]]
+== Identity Columns
+
+Trafodion introduces the ability defining an identity clause against a
table column defined using a numeric type. The syntax is shown below.
+
+```
+GENERATED
+[ALWAYS | BY DEFAULT]
+AS IDENTITY [(identity_options)]
+```
+
+Ignoring the identity_options, which match those of the
<>, this syntax allows us
to use three variations on the identity functionality.
+
+[[syntax_description_of_identity_columns]]
+=== Syntax Description of Identity Columns
+* `ALWAYS`
++
+Using ALWAYS forces the use of the identity. If an insert statement
references the identity column, even to specify a NULL value, an error is
produced.
+
+* `BY DEFAULT`
++
+Using BY DEFAULT allows you to use the identity if the column isn't
referenced in the insert statement, but if the column is referenced, the
specified value will be used in place of the identity. Attempting to specify
the value NULL in this case results in an error, since identity columns are
always NOT NULL.
--- End diff --
line is too long, need to limit each line's length, to generate a better
HTML displaying.
This is a general comment, please consider to change all 'long lines' below
into fixed width line.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---