Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.10.24;
Скачать: CL | DM;

Вниз

Как создать вторичный индекс Paradox-таблицы по убыванию на SQL?   Найти похожие ветки 

 
_Vovan_   (2004-09-28 18:43) [0]

Уважаемые мастера,
как с помощью TQuery.SQL правильно написать текст запроса, который создавал бы вторичный индекс для таблицы Paradox7, сортированный по убыванию?
Пишу CREATE INDEX Ind1 ON Table1 (Pole1) - это будет по возрастанию. А как правильно с DESC? И возможно ли это в принципе?


 
Vlad ©   (2004-09-28 18:49) [1]

Это из хелпа по LocalSQL

Creates a secondary index.

CREATE [UNIQUE] [ASC | DESC] INDEX index_reference ON table_reference (column_reference [,column_reference...])

Description

Use the CREATE INDEX statement to create a secondary index for an existing table. Index names may not have embedded spaces. Paradox indexes may be based on multiple columns. Due to the distinctive nature of dBASE expression indexes, only single-column indexes can be created with CREATE INDEX.

Use UNIQUE to create an index that raises an error if rows with duplicate column values are inserted. By default, indexes are not unique.

Use ASC (or ASCENDING) to create an index that orders data in an ascending direction (smallest to largest). DESC (or DESCENDING) creates a descending ordering (largest to smallest). When a direction imperative is not specified, ASC is the implied default.

The following statement creates a multi-column (compound) Paradox secondary index.

CREATE INDEX custdate ON "orders.db" (custno, saledate)

The following statement creates a unique dBASE secondary index.

CREATE UNIQUE INDEX namex ON "employee.dbf" (last_name)


 
_Vovan_   (2004-09-28 18:53) [2]

Vlad ©   (28.09.04 18:49)

Большое спасибо!



Страницы: 1 вся ветка

Текущий архив: 2004.10.24;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.057 c
4-1094799811
Александр1
2004-09-10 11:03
2004.10.24
USB


3-1095941523
Snip
2004-09-23 16:12
2004.10.24
Динамическое создание компонетов TIBDatabase и TIBTransation


14-1096893983
}|{yk
2004-10-04 16:46
2004.10.24
Кстати, как впечатления от последнего боя Кличко?


1-1097221054
П7
2004-10-08 11:37
2004.10.24
WaitForSingleObject с перерисовкой вызвавшего приложения


1-1097241483
LicProd
2004-10-08 17:18
2004.10.24
Как, не испортив изображения, повернуть прямоугольник в TImage