This topic describes the rules for expressions that you need to enter when you create logical tables.

  • Simple rules
    Rule Example
    Create tables whose names contain numbers that increment in numerical order test_[0-7]: creates eight tables whose names contain numbers that increment in numerical order.
    Create tables whose names contain numbers that have the same number of digits and increment in numerical order
    • test_[00-07]: creates eight tables whose names contain two-digit numbers that increment in numerical order.
    • test_[000-007]: creates eight tables whose names contain three-digit numbers that increment in numerical order.
    • test_[000-007]: creates eight tables whose names contain four-digit numbers that increment in numerical order.
    Create tables whose names contain numbers that increment in numerical order with a specified step test_[0-8:2]: creates five tables named test_0, test_2, test_4, test_6, and test_8. The step is 2.
    Create tables whose names contain numbers that have the same number of digits and increment in numerical order with a specified step test_[00-07:3]: creates three tables named test_00, test_03, and test_06. The step is 3.
    Create tables whose names contain incrementing numbers in the middle part test_[00-31]_t: creates tables whose names contain numbers from 00 to 31 in the middle part.
  • Multi-level rules
    Rule Example
    Create tables whose names contain numbers that represent months and dates test_[01-12]_[01-31]: creates tables whose names contain numbers that represent the first to 31st days in 12 months. The total number of the tables to be created is 12 × 31.
    Create tables whose names contain numbers that represent months and dates incrementing with specified steps test_[01-12:2]_[01-31:2]: creates tables whose names contain numbers that represent odd dates in odd months. The total number of tables to be created is 6 × 16.
    Create tables that are distributed by month alicom_billing_bill_[0000-0007].zw_add_month_[01-12]_[0000-0063/8]: divides the 64 suffixes. The following tables are to be created: alicom_billing_bill_0000.zw_add_month_[01-12]_[0000-0007], alicom_billing_bill_0000.zw_add_month_[01-12]_[0008-0015], ..., and alicom_billing_bill_0007.zw_add_month_[01-12]_[0056-0063].
  • Rules for databases and tables
    Rule Example
    Create tables that have the same name db_[00-31].test: creates tables named test in databases numbered from 00 to 31.
    Create tables and evenly distribute the tables to specified databases db_[00-31].test[0000-1023]: creates 1,024 tables and evenly distributes the tables to databases numbered from 00 to 31.
  • Enumeration rules
    Rule Example
    Create tables based on a simple enumeration test_[1,3,6,8,9]: creates five tables in the specified database.
    Create tables based on a complex enumeration Use multiple expressions to create tables and evenly distribute the tables to specified databases. Examples:
    • test_[1,3,6,8,9],test_[2,4,5,7,10]
    • test_[1-9:2,10-20:2]
  • Enumeration rules for databases
    Rule Example
    Create the same tables in specified databases db_[00-31].test_[[00-31]]: creates tables named test_[00-31] in each of the databases numbered from 00 to 31.
    Create tables based on enumeration rules in specified databases db_01.test_[1,2,4,6,7],db_02.test_[2,3,5,7,9],db_03.test_[1,4,6,7,9]: creates five tables with specified names in the three databases.
    Create different number of tables in different databases db_01.test_[1-7] and db_02.test_[10-15]: creates seven tables in database db_01 and six tables in database db_02.