Create a mysql dynamic table

Source: Internet
Author: User
To create a mysql dynamic table, first check whether the table exists. Use the SQL statement :?? 1. SHOW? TABLES? LIKE? % Tb_bp_d_case % ;?? 2. select 'table _ name' from 'information _ scheme'. 'tables' where 'table _ scheme' dbname? And 'table _ name' tablename ?;

To create a mysql dynamic table, first check whether the table exists. Use the SQL statement :? ? 1. SHOW? TABLES? LIKE? '% Tb_bp_d_case % ';?? 2. select 'table _ name' from 'information _ scheme'. 'tables' where 'table _ scheme' = 'dbname '? And 'table _ name' = 'tablename '?;

Create a mysql dynamic table

To create a mysql dynamic table, you must first check whether the table exists.

Use SQL statements:

?

?

1. SHOW? TABLES? LIKE? '% Tb_bp_d_case % ';??
2. select 'table _ name' from 'information _ scheme'. 'tables' where 'table _ scheme' = 'dbname '? And 'table _ name' = 'tablename '?;
3. If the table does not exist, create the table. Can I use it directly? Create? Table? If? Not? Exists? Tablename? To create such a command, you do not need to first check whether the table exists.
4. create a table from the template table: create table if not exists like old_table_name? (This is currently used)

Split data according to the partition table.

?

?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.