CREATE BROADCAST TABLE RULE

Description

The CREATE BROADCAST TABLE RULE syntax is used to create broadcast table rules for tables that need to be broadcast (broadcast tables)

Syntax

Grammar Railroad diagram

  1. CreateBroadcastTableRule ::=
  2. 'CREATE' 'BROADCAST' 'TABLE' 'RULE' ifNotExists? tableName (',' tableName)*
  3. ifNotExists ::=
  4. 'IF' 'NOT' 'EXISTS'
  5. tableName ::=
  6. identifier

Supplement

  • tableName can use an existing table or a table that will be created;
  • ifNotExists clause is used for avoid Duplicate Broadcast rule error.

Example

Create broadcast table rule

  1. -- Add t_province, t_city to broadcast table rules
  2. CREATE BROADCAST TABLE RULE t_province, t_city;

Create broadcast table rule with ifNotExists clause

  1. CREATE BROADCAST TABLE RULE IF NOT EXISTS t_province, t_city;

Reserved word

CREATE, BROADCAST, TABLE, RULE