Only want to add 'date_observation_for_exact_id_galery' column to index.
Code:
ALTER TABLE `tezaver_place_date`
DROP PRIMARY KEY,
ADD PRIMARY KEY (`id_tezaver`, `cc2`, `place_id`, `date_observation`, `micro_location`, `id_galery`, `date_observation_for_exact_id_galery`) USING BTREE;
/* SQL Error (1265): Data truncated for column 'date_observation_for_exact_id_galery' at row 3 */
__________________
Found a flower or bug and don't know what it is ? agrozoo.net galery
if you don't spot search button at once, there is search form: agrozoo.net galery search
aparently adding index on 'date_observation_for_exact_id_galery' column, does not work if thee are null values !?
Cant imagine why ewerything else work exept adding index.
__________________
Found a flower or bug and don't know what it is ? agrozoo.net galery
if you don't spot search button at once, there is search form: agrozoo.net galery search
Do you need all those columns to have a primary key? If you were looking to query efficiently you might create some other indexes for that purpose.
Also, as a primary key, you can only include NOT NULL defined columns.
Quote:
http://dev.mysql.com/doc/refman/5.1/...ate-table.html
A PRIMARY KEY is a unique index where all key columns must be defined as NOT NULL. If they are not explicitly declared as NOT NULL, MySQL declares them so implicitly (and silently). A table can have only one PRIMARY KEY. The name of a PRIMARY KEY is always PRIMARY, which thus cannot be used as the name for any other kind of index.