mirror of
https://github.com/apache/impala.git
synced 2025-12-19 09:58:28 -05:00
Change-Id: Ibb7ce9fa20fb1d6551d718c8ec25c746a72b40d9 Reviewed-on: http://gerrit.cloudera.org:8080/11370 Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Reviewed-by: Vuk Ercegovac <vercegovac@cloudera.com>
111 lines
3.3 KiB
XML
111 lines
3.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
-->
|
|
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
|
|
<concept id="comment">
|
|
|
|
<title>COMMENT Statement</title>
|
|
|
|
<titlealts audience="PDF">
|
|
|
|
<navtitle>COMMENT</navtitle>
|
|
|
|
</titlealts>
|
|
|
|
<prolog>
|
|
<metadata>
|
|
<data name="Category" value="Impala"/>
|
|
<data name="Category" value="SQL"/>
|
|
<data name="Category" value="DDL"/>
|
|
<data name="Category" value="Tables"/>
|
|
<data name="Category" value="Hive"/>
|
|
<data name="Category" value="Metastore"/>
|
|
<data name="Category" value="ETL"/>
|
|
<data name="Category" value="Ingest"/>
|
|
<data name="Category" value="Developers"/>
|
|
<data name="Category" value="Data Analysts"/>
|
|
</metadata>
|
|
</prolog>
|
|
|
|
<conbody>
|
|
|
|
<p>
|
|
The <codeph>COMMENT</codeph> statement adds, changes, or removes a comment about a
|
|
database, a table, or a column.
|
|
</p>
|
|
|
|
<p>
|
|
You can alternatively use the <codeph>CREATE</codeph> and <codeph>ALTER</codeph>
|
|
statements to add comments to the objects.
|
|
</p>
|
|
|
|
<p>
|
|
You can view the comment on a database, a table, or a column using the
|
|
<codeph>SHOW</codeph> or <codeph>DESCRIBE</codeph> statement.
|
|
</p>
|
|
|
|
<p conref="../shared/impala_common.xml#common/syntax_blurb"/>
|
|
|
|
<codeblock>COMMENT ON DATABASE <varname>db_name</varname> IS {'<varname>comment</varname>' | NULL}</codeblock>
|
|
|
|
<codeblock>COMMENT ON TABLE [<varname>db_name</varname>.]<varname>table_name</varname> IS {'<varname>comment</varname>' | NULL}</codeblock>
|
|
|
|
<codeblock>COMMENT ON COLUMN [<varname>db_name</varname>.]<varname>table_name</varname>.<varname>column_name</varname> IS {'<varname>comment</varname>' | NULL}</codeblock>
|
|
|
|
<p>
|
|
<b>Parameters:</b>
|
|
</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<varname>db_name</varname>: Specify the database name if not for the current database.
|
|
</li>
|
|
|
|
<li>
|
|
<codeph>NULL</codeph>: If given for the comment, removes the existing comment.
|
|
</li>
|
|
|
|
<li>
|
|
The <varname>comment</varname> string can be up to 256 characters long.
|
|
</li>
|
|
</ul>
|
|
|
|
<p>
|
|
<b>Privileges required:</b>
|
|
</p>
|
|
|
|
<p>
|
|
To add a comment, the <codeph>ALTER</codeph> privilege on the object is required.
|
|
</p>
|
|
|
|
<p>
|
|
To view a comment, the <codeph>SELECT</codeph>, <codeph>INSERT</codeph>, or
|
|
<codeph>REFRESH</codeph> on the object is required.
|
|
</p>
|
|
|
|
<p conref="../shared/impala_common.xml#common/usage_notes_blurb"/>
|
|
|
|
<p>
|
|
<b>Added in:</b> <keyword keyref="impala31"/>
|
|
</p>
|
|
|
|
</conbody>
|
|
|
|
</concept>
|