Returns a vtable with the primary keys of the table.
1 connection.metadata.getPrimaryKeys
<connection.metadata.getPrimaryKeys>
<catalog /> +
<schema /> +
<table /> +
</connection.metadata.getPrimaryKeys>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Ecatalog | String | Catalog. | |||
Eschema | String | Schema. | |||
Etable | String | Table. |
Returns | |
---|---|
Type | Description |
Vtable | Returns a vtable with the primary keys of the table |
Example
Shows the primary keys of the table capuntes.
Copy
<xsql-script name='connection_metadata.getAttributes_sample1'> <body> <println> <connection.metadata.getPrimaryKeys> <null /> <null /> <string>capuntes</string> </connection.metadata.getPrimaryKeys> </println> </body> </xsql-script>
Copy
+--------------+-----------+----------+-----------+-------+----------+ |table_cat |table_schem|table_name|column_name|key_seq|pk_name | +--------------+-----------+----------+-----------+-------+----------+ |demo_formacion|informix |capuntes |apteid | 1|p_capuntes| +--------------+-----------+----------+-----------+-------+----------+