Create a MySQL Partition Table

Source: Internet
Author: User

Partitioned table created

Create Table 'employees '(
'Id' int (11) not null,
'Fname' varchar (30) default null,
'Lname' varchar (30) default null,
'Hired' date not null default '2017-01-01 ',
'Separated 'date not null default '2017-12-31 ',
'Job _ Code' int (11) not null,
'Store _ id' int (11) not null
) Engine = MyISAM default charset = Latin1
/*! 50100 partition by range (store_id)
(Partition P0 values less than (6) engine = MyISAM,
Partition P1 values less than (11) engine = MyISAM,
Partition P2 values less than (16) engine = MyISAM) */|

 

/*! 50100 pay attention to this
This is used to limit the version. if the version is earlier than the marked version, this section will be ignored.

Mysql> select /*! 40100 now ()*/;
+ --------------------- +
| Now () |
+ --------------------- +
| 21:37:09 |
+ --------------------- +
1 row in SET (0.00 Sec)

Mysql> select /*! 50100 now ()*/;
Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL Server version for the right syntax to use near ''at line 1
Mysql> select version ();
+ ------------ +
| Version () |
+ ------------ +
| 4.1.18-log |
+ ------------ +
1 row in SET (0.00 Sec)

Related Article

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.