huaxingao commented on a change in pull request #27779: 
[SPARK-30962][DOC]Documentation for Alter table command phase 2
URL: https://github.com/apache/spark/pull/27779#discussion_r388008600
 
 

 ##########
 File path: docs/sql-ref-syntax-ddl-alter-table.md
 ##########
 @@ -83,6 +82,108 @@ ALTER TABLE table_identifier ADD COLUMNS ( col_spec [ , 
col_spec ... ] )
 </dl>
 
 
+### ALTER OR CHANGE COLUMN
+`ALTER TABLE ALTER COLUMN` or `ALTER TABLE CHANGE COLUMN` statement changes 
column's comment.
+
+#### Syntax
+{% highlight sql %}
+ALTER TABLE table_identifier { ALTER | CHANGE } COLUMN col_spec 
alterColumnAction
+{% endhighlight %}
+
+#### Parameters
+<dl>
+  <dt><code><em>table_identifier</em></code></dt>
+  <dd>
+    Specifies a table name, which may be optionally qualified with a database 
name.<br><br>
+    <b>Syntax:</b>
+      <code>
+        [ database_name. ] table_name
+      </code>
+  </dd>
+</dl>
+
+<dl>
+  <dt><code><em>COLUMN col_spec</em></code></dt>
+  <dd>Specifies the columns to be altered to be changed.</dd>
+</dl>
+
+<dl>
+  <dt><code><em>alterColumnAction</em></code></dt>
+   <dd>
+     Change the comment string.<br><br>
 
 Review comment:
   I saw the following in ```SqlBase.g4```.    Can ```alterColumnAction``` 
change type, colPosition, setOrDrop as well?
   ```
   alterColumnAction
       : TYPE dataType
       | commentSpec
       | colPosition
       | setOrDrop=(SET | DROP) NOT NULL
       ;
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to