CREATE DATABASE SQL Statement | Teradata Vantage - 17.10 - CREATE DATABASE - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)

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