CREATE-LIKE() method
- Last Updated: January 22, 2026
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
LIKE a database table or another temp-table
with all its fields and at least one of its indexes, use the CREATE-LIKE() method to copy all fields from the source
table to the temp-table definition, along with index definitions:
|
You define the source table by either passing its handle or its name. The name expression
can be either the table name as a quoted literal or a character expression that
evaluates to the table name. A source table can be either a database table for a
currently connected database or another temp-table whose scope makes it available to the
procedure with the CREATE-LIKE method.
Customer table, along with just the
Name index:
|
You can only use the CREATE-LIKE method once for a temp-table
definition, when the temp-table is in the clear state. Thus, if you use this method, it
must be the first method you invoke for the temp-table. If you want fields from
additional tables in the temp-table, you use the ADD-FIELDS-FROM()
method to add them. If you want to add more indexes from the source table, you can use
the ADD-LIKE-INDEX() method to do this.