Clodo <[EMAIL PROTECTED]> wrote: > > But a changelogs say: > "Version 3.3.0 adds support for CHECK constraints, DESC indices, ...." > > I use the 3.5.2 version. > What's the status/problem about that? > How i can re-write the first select above to use an index on both fields? > Thanks! >
DESC indices requires a backwards-compatible file format changes. Older versions of SQLite (prior to 3.3.0) cannot read or write databases that make use of DESC indicdes. To preserve compatibility, SQLite generates databases in the old format by default. This means the the DESC keyword is ignored. To generate a new-format database that honors the DESC keyword on indices, you have to do this: PRAGMA legacy_file_format=OFF; Prior to doing your very first CREATE TABLE statement. Or, you can compile SQLite to use the new file format by default using -DSQLITE_DEFAULT_FILE_FORMAT=4 Note that newer versions of SQLite understand both the old and the new format and can read and write both kinds of database files. The reason for continuing to use the older file format is that otherwise older versions of SQLite could not read or write database files created by newer versions of SQLite. At some point in the future, once everybody has upgraded past SQLite 3.3.0, we will probably switch to generating the new file format by default. -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------