Manage databases

更新时间:
复制 MD 格式

This topic describes how you can manage Fluss databases.

Limits

This feature is supported only in Ververica Runtime (VVR) 11.2 and later.

Create a database

  1. Log on to the Streaming Compute Flink console.

  2. Find the target Streaming Compute Flink workspace and click Console in the Operation column.

  3. In the navigation pane on the left, click Data Development > Data Query > New Temporary Query Script.

  4. Write and run the SQL statement.

-- Create a database in the current catalog
USE CATALOG `<catalog-name>`;
CREATE DATABASE `<db-name>`; 

-- Create a database in a specified catalog
CREATE DATABASE `<catalog-name>`.`<db-name>`; 

Delete a database

-- Delete a database from the current catalog
USE CATALOG `<catalog-name>`;
DROP DATABASE `<db-name>`; 

-- Delete an empty database from a specified catalog
DROP DATABASE `<catalog-name>`.`<db-name>`; 

-- Delete a database and all tables in it.
DROP DATABASE `<catalog-name>`.`<db-name>` CASCADE;