You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2017/09/27 23:09:30 UTC
[1/2] incubator-trafodion git commit: Add an example of Alter Column
Name
Repository: incubator-trafodion
Updated Branches:
refs/heads/master e9fb80424 -> 4c9423f62
Add an example of Alter Column Name
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/723b07d7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/723b07d7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/723b07d7
Branch: refs/heads/master
Commit: 723b07d758c151c2bdcee278e4449b3bd4bfc6d3
Parents: 69522ab
Author: liu.yu <yu...@esgyn.cn>
Authored: Sun Sep 17 16:35:44 2017 +0800
Committer: liu.yu <yu...@esgyn.cn>
Committed: Sun Sep 17 16:35:44 2017 +0800
----------------------------------------------------------------------
.../src/asciidoc/_chapters/sql_statements.adoc | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/723b07d7/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
----------------------------------------------------------------------
diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
index e8f446e..43a42ae 100644
--- a/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
+++ b/docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
@@ -374,7 +374,7 @@ statement inside a user-defined transaction (BEGIN WORK…COMMIT WORK) or wh
To run this statement, AUTOCOMMIT must be turned ON (the default) for the session.
```
-ALTER TABLE name alter-action
+ALTER TABLE table-name alter-action
alter-action is:
ADD [IF NOT EXISTS][COLUMN] column-definition
@@ -658,17 +658,16 @@ If the constraint refers to the other table in a query expression, you must also
[[alter_table_examples]]
=== Example of ALTER TABLE
-* This example adds a column.
-
+* This example adds a column:
++
```
ALTER TABLE persnl.project
ADD COLUMN projlead
NUMERIC (4) UNSIGNED
```
-
-* This example alters a column of an existing table – showing both positive and negative cases.
-
+* This example alters a column of an existing table – showing both positive and negative cases:
++
```
>>INVOKE T;
@@ -706,6 +705,12 @@ ALTER TABLE persnl.project
--- SQL operation failed with errors.
```
+* This example alters the name of the column:
++
+```
+Alter TABLE PRODUCT
+ALTER COLUMN vend_id RENAME TO cstm_id;
+```
<<<
[[alter_user_statement]]
[2/2] incubator-trafodion git commit: Merge [TRAFODION-2745] PR 1235
Add ALTER COLUMN example to Traf SQL Manual
Posted by db...@apache.org.
Merge [TRAFODION-2745] PR 1235 Add ALTER COLUMN example to Traf SQL Manual
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/4c9423f6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/4c9423f6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/4c9423f6
Branch: refs/heads/master
Commit: 4c9423f6283ee2a2bd7a1bafe3c08e14db85a916
Parents: e9fb804 723b07d
Author: Dave Birdsall <db...@apache.org>
Authored: Wed Sep 27 23:08:55 2017 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Wed Sep 27 23:08:55 2017 +0000
----------------------------------------------------------------------
.../src/asciidoc/_chapters/sql_statements.adoc | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------