CREATE DATABASE SQL Statement | Teradata Vantage - CREATE DATABASE - Analytics Database - Teradata Vantage

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™

Creates a database in which other database objects can be created.

ANSI Compliance

This statement is a Teradata extension to the ANSI SQL:2011 standard.

CREATE DATABASE is functionally similar to the ANSI CREATE SCHEMA statement.

Required Privileges

To create a database, you must have the CREATE DATABASE privilege on the immediate owner database.

No privilege is needed to specify a DEFAULT JOURNAL TABLE in a database other than the database being created. However, when a table is created that specifies a journal, the user creating the table must have INSERT privilege on the journal table.

Privileges Granted Automatically

The privileges granted to the creator and owner on the new database are WITH GRANT OPTION.

The following privileges are automatically granted to a database when it is created:

  • CHECKPOINT
  • CREATE AUTHORIZATION
  • CREATE DATABASE
  • CREATE MACRO
  • CREATE TABLE
  • CREATE TRIGGER
  • CREATE USER
  • CREATE VIEW
  • DELETE
  • DROP AUTHORIZATION
  • DROP DATABASE
  • DROP FUNCTION
  • DROP MACRO
  • DROP TABLE
  • DROP PROCEDURE
  • DROP TABLE
  • DROP TRIGGER
  • DROP USER
  • DROP VIEW
  • DUMP
  • EXECUTE
  • INSERT
  • RESTORE
  • REVOKE
  • SELECT
  • STATISTICS
  • UPDATE

Privileges Not Granted Automatically

The following privileges on itself are not automatically granted to a database when it is created:

  • ALTER EXTERNAL PROCEDURE
  • ALTER FUNCTION
  • ALTER PROCEDURE
  • CREATE DATABASE
  • CREATE EXTERNAL PROCEDURE
  • CREATE FUNCTION
  • CREATE PROCEDURE
  • CREATE USER
  • DROP DATABASE
  • DROP USER
  • EXECUTE FUNCTION
  • EXECUTE PROCEDURE