kevinyu98 commented on a change in pull request #25528: [SPARK-28802][DOC][SQL]Document DESCRIBE DATABASE statement in SQL Reference URL: https://github.com/apache/spark/pull/25528#discussion_r321416544
########## File path: docs/sql-ref-syntax-aux-describe-database.md ########## @@ -18,5 +18,79 @@ license: | See the License for the specific language governing permissions and limitations under the License. --- +### Description + +`DESCRIBE DATABASE` statement returns the metadata of an existing database. The metadata information includes database +name, database comment, and database location on the filesystem. If the optional `EXTENDED` option is specified, it +returns the basic metadata information along with the database properties. The `DATABASE` and `SCHEMA` are +interchangeable. -**This page is under construction** +### Syntax +{% highlight sql %} +{DESC | DESCRIBE} DATABASE [EXTENDED] db_name +{% endhighlight %} + +### Parameters +<dl> + <dt><code><em>db_name</em></code></dt> + <dd> + Specifies a name of an existing database or an existing schema in the syetem. If the name does not exist, an + exception is thrown. The name is case insensitive, it is stored as low case in SPARK<br><br> + </dd> +</dl> + +### Example +{% highlight sql %} +-- Create employees DATABASE +CREATE DATABASE EMPLOYEES COMMENT 'For software companies'; + +-- Describe employees DATABASE. +-- Returns Database Name, Description and Root location of the filesystem for the employees DATABASE Review comment: ok ---------------------------------------------------------------- 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