Tag Info

Hot answers tagged

1

For an Update to the existing table, one solution would be: UPDATE t SET t.New_Column = CASE WHEN types.mintype = 'F' and types.maxtype = 'F' THEN 'FTW' WHEN types.mintype = 'N' and types.maxtype = 'N' THEN 'Non-FTW' WHEN types.mintype = 'F' AND types.maxtype = 'N' THEN 'Mixed' END FROM tbl t INNER JOIN ...


1

I am not 100% sure, but 5.1 documentation says: PARTITION_DESCRIPTION: This column is used for RANGE and LIST partitions. For a RANGE partition, it contains the value set in the partition's VALUES LESS THAN clause, which can be either an integer or MAXVALUE. For a LIST partition, this column contains the values defined in the partition's VALUES ...


1

Yes, there is. I would change the partition names to something more meaningful. Let say the table look like this in the mydb database: CREATE TABLE mytable ( id INT NOT NULL AUTO_INCREMENT, date DATETIME, PRIMARY KEY (id,date), KEY (date) ) PARTITION BY RANGE( YEAR(date) ) ( PARTITION p2015 VALUES LESS THAN (2016), PARTITION p2016 ...



Only top voted, non community-wiki answers of a minimum length are eligible