| --- |
| layout: global |
| title: Data Definition Statements |
| displayTitle: Data Definition Statements |
| license: | |
| 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. |
| --- |
| |
| Data Definition Statements are used to create or modify the structure of database objects in a database. Spark SQL supports the following Data Definition Statements: |
| |
| * [ALTER DATABASE](sql-ref-syntax-ddl-alter-database.html) |
| * [ALTER TABLE](sql-ref-syntax-ddl-alter-table.html) |
| * [ALTER VIEW](sql-ref-syntax-ddl-alter-view.html) |
| * [CREATE DATABASE](sql-ref-syntax-ddl-create-database.html) |
| * [CREATE FUNCTION](sql-ref-syntax-ddl-create-function.html) |
| * [CREATE TABLE](sql-ref-syntax-ddl-create-table.html) |
| * [CREATE VIEW](sql-ref-syntax-ddl-create-view.html) |
| * [DROP DATABASE](sql-ref-syntax-ddl-drop-database.html) |
| * [DROP FUNCTION](sql-ref-syntax-ddl-drop-function.html) |
| * [DROP TABLE](sql-ref-syntax-ddl-drop-table.html) |
| * [DROP VIEW](sql-ref-syntax-ddl-drop-view.html) |
| * [TRUNCATE TABLE](sql-ref-syntax-ddl-truncate-table.html) |
| * [REPAIR TABLE](sql-ref-syntax-ddl-repair-table.html) |
| * [USE DATABASE](sql-ref-syntax-ddl-usedb.html) |