Kittiphum Worachat writes:
> Is it possible to use function such as year() in index key (like use subpart
> for string field that it work)
Nope, you'll have to have a column with just the information that you
wish to index (except in the case of strings, of course). Also, you
yourself will have
Hi.
Is it possible to use function such as year() in index key (like use subpart
for string field that it work)
I try this
ALTER TABLE XXX ADD INDEX YYY (Year(DoBirth)); ---> error syntax error
ALTER TABLE XXX ADD INDEX YYY (DoBirth(4)); ---> error used key part isn't
string
Thanks.
Kittiphum
Hi all.
How to build index with some function like year() instead of use the whole
column type date.
because I don't need to use the whole lenght (10 bytes) for index but I want
to tuo use only year (first 4 bytes) for index key when I try
ALTER TABLE xxx ADD INDEX yyy (year(BDATE)) > error