Description:
Create a new composite table file using the data structure of an existing composite table.
Syntax:
T.create(f;x)
Note:
The function creates a new composite table file f using table structure of composite table T, and generates a multi-zone composite table file when the target f is a file group. f will include T’s attached tables.
Parameters:
T |
A composite table |
f |
A composite table file or a file group |
x |
An integer, which is the zone table expression |
Return value:
A composite table
Example:
|
A |
|
1 |
=create(k1,v1).record([1,10,2,20]).cursor() |
Return a cursor that has data as follows: |
2 |
=create(k1,k2,v2).record([1,11,111,2,22,222]).cursor() |
Return a cursor that has data as follows: |
3 |
=file("ctb.ctx").open() |
Open a composite table file that contains an attached table table2 |
4 |
=A3.create@y(file("emp929.ctx")) |
Create new composite table file ctbCp.ctx, as well as its attached table, using data structure of composite table ctb.ctx |
5 |
=A4.append@i(A1) |
Append data of A1’s cursor to the base table of composite table ctbCp.ctx |
6 |
=A4.attach(table2) |
Open A4’s attached table table2 |
7 |
=A6.append@i(A2) |
Append data of A2’s cursor to ctbCp.ctx’s attached table table2 |