[GitHub] incubator-trafodion pull request #895: [TRAFODION-2412]update sql reference ...

2016-12-26 Thread liuyu000
Github user liuyu000 closed the pull request at:

https://github.com/apache/incubator-trafodion/pull/895


---
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.
---


[GitHub] incubator-trafodion pull request #895: [TRAFODION-2412]update sql reference ...

2016-12-26 Thread traflm
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.
---


[GitHub] incubator-trafodion pull request #895: [TRAFODION-2412]update sql reference ...

2016-12-25 Thread liuyu000
GitHub user liuyu000 opened a pull request:

https://github.com/apache/incubator-trafodion/pull/895

[TRAFODION-2412]update sql reference manual about SEQUENCE and IDENTITY 
column

Changes proposed in this pull request:
• Add "CREATE SEQUENCE Statement", "DROP SEQUENCE Statement" & "ALTER 
SEQUENCE Statement".
• Add "Identity Columns".
 



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/liuyu000/incubator-trafodion sequence_identity

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/895.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #895


commit 967b2234dcc19ebdac8e906922e74b4651b2026f
Author: liu.yu 
Date:   2016-12-26T05:16:38Z

identity

commit 49b8a2724d583d9a606c4c9364dabb43fef8d72b
Author: liu.yu 
Date:   2016-12-26T06:25:46Z

create,alter,drop sequence




---
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.
---