show tables
show [as json] {tables | table table_name}
Shows either all tables in the data store, or one specific table, table_name.
Specify a fully-qualified
table_name
as follows:
Entry specification | Description |
---|---|
table_name |
Required. Specifies the full table name. Without further qualification, this entry indicates a table created in the default namespace (sysdefault), which you do not have to specify. |
parent-table.child-table |
Specifies a child table of a parent. Specify the parent table followed by a period (.) before the child name. For example, if the parent table is Users , specify the child table named MailingAddress as Users.MailingAddress .
|
|
Specifies a table created in the non-default namespace. Use the namespace followed by a colon (:). For example, to reference table Users , created in the Sales namespace, enter table_name as Sales:Users .
|
The following example indicates how to list all tables, or just one table. The empty tableHierarchy
field indicates that table t1
was created in the default namespace:
sql-> show tables
tables
SYS$IndexStatsLease
SYS$PartitionStatsLease
SYS$SGAttributesTable
SYS$TableStatsIndex
SYS$TableStatsPartition
ns10:t10
parent
parent.child
sg1
t1
sql-> show table t1
tableHierarchy
t1
To show a table created in a namespace, as shown in the list of all tables, fully-qualify
table_name
as follows. In this case, tableHierarchy
field lists namespace ns1
in which table t1
was created. The example also shows how the table is presented as json:
sql-> show tables;
tables
SYS$IndexStatsLease
SYS$PartitionStatsLease
SYS$SGAttributesTable
SYS$TableStatsIndex
SYS$TableStatsPartition
ns1:foo
ns1:t1
sql-> show table ns1:t1;
tableHierarchy(namespace ns1)
t1
sql-> show as json table ns1:t1;
{"namespace": "ns1"
"tableHierarchy" : ["t1"]}