Home » Community » Newbie corner » SqlSchema sch(MY_SQL) compound and or unique indexes
SqlSchema sch(MY_SQL) compound and or unique indexes [message #55930] |
Mon, 04 January 2021 13:19  |
BetoValle
Messages: 204 Registered: September 2020 Location: Brasil Valinhos SP
|
Experienced Member |
|
|
Hi,
so that the schema file (sch) creates an index (compound) just like the sql command is created as
CREATE INDEX index1 ON table1(A,B);
and
CREATE UNIQUE INDEX index2 ON table(C,D);
if I leave only with index keyword it will create 4 distinct indexes and my intention is 2 indexes.
sch:
TABLE_(TABLE1)
INT_ (ID) PRIMARY_KEY
STRING_ (A, 30) INDEX ?? (1)
STRING_ (B, 30) INDEX ?? (1)
STRING_ (C, 30) INDEX ?? UNIQUE? (2)
STRING_ (D, 30) INDEX ?? UNIQUE? (2)
END_TABLE
How i do to create sch with 2 compound indexes ?
thanks
|
|
|
Re: SqlSchema sch(MY_SQL) compound and or unique indexes [message #55931 is a reply to message #55930] |
Mon, 04 January 2021 13:43  |
BetoValle
Messages: 204 Registered: September 2020 Location: Brasil Valinhos SP
|
Experienced Member |
|
|
OK , I found index_list and unique_list and work! thanks!
TABLE_(TABLE1)
INT_ (ID) PRIMARY_KEY
STRING_ (A, 30)
STRING_ (B, 30)
STRING_ (C, 30)
STRING_ (D, 30)
INDEX_LIST (NOMEINDICE1,"A, B")
UNIQUE_LIST(NOMEINDICE2,"C, D")
END_TABLE
|
|
|
Goto Forum:
Current Time: Mon May 12 03:18:28 CEST 2025
Total time taken to generate the page: 0.00452 seconds
|