SHOW TABLES statement
Shows the list of FeatureBase tables that exist on the server.
BNF diagram
Syntax
SHOW TABLES [WITH SYSTEM];
Arguments
Argument | Description |
---|---|
SHOW TABLES | Return all tables owned by the user |
WITH SYSTEM | Include FeatureBase system tables in results |
Returns
Column Name | Data type | Description | Additional information |
---|---|---|---|
_id | id or string | Table ID | _id column |
name | string | Name of the table | naming standards |
owner | string | Owner of table (omitted for system-created sample data) | |
updated_by | string | Last user to update table | |
created_at | timestamp | Table time-date created | TIMESTAMP() data type |
updated_at | timestamp | Table time-date last updated | TIMESTAMP() data type |
keys | bool | Boolean that is true when keys are used (_id) is a string | |
space_used | int | bytes used by the table. | |
description | string | description COMMENT of the table |
Additional information
_id
column
The _id
column in each table represents the primary key and supports two data types:
Data type | Description | Example | Advantage | Disadvantage |
---|---|---|---|---|
ID data type | One or more contiguous blocks of positive integers | 7,8,9,10,11,12,...20,21,22,23,... | Faster queries | Warning: performance and storage are adversely affected if values are non-contiguous |
String data type | String literal values can be supplied in any order if used as primary key | “a23”, “s93kk”, “h82k”, “2023-02-10”,… | Automatically mapped to blocks of contiguous integers | Higher storage and performance costs |
Naming standards
FeatureBase identifiers (including object names such as databases, tables and columns) start with a lower-case alphabetic character and can include:
- lower-case alphabetic characters
- numbers 0-9
-
dash
-
and underscore_
characters. -
table names can be up to 230 characters in length
- column names can be up to 64 characters in length
Examples
Show your tables
SHOW TABLES;
Results:
_id | name | owner | updated_by | created_at | updated_at | keys | space_used | description
-------------------------+-------------------------+-------+------------+---------------------------+---------------------------+-------+-------------+------------------------------------
skills | skills | | | 1969-12-31T18:00:00-06:00 | 1969-12-31T18:00:00-06:00 | true | 37998707 |
Show your tables and system tables
SHOW TABLES WITH SYSTEM;
Results:
_id | name | owner | updated_by | created_at | updated_at | keys | space_used | description
-------------------------+-------------------------+-------+------------+---------------------------+---------------------------+-------+-------------+------------------------------------
fb_database_info | fb_database_info | | | 1969-12-31T18:00:00-06:00 | 1969-12-31T18:00:00-06:00 | false | 0 |
fb_database_nodes | fb_database_nodes | | | 1969-12-31T18:00:00-06:00 | 1969-12-31T18:00:00-06:00 | false | 0 |
fb_exec_requests | fb_exec_requests | | | 1969-12-31T18:00:00-06:00 | 1969-12-31T18:00:00-06:00 | false | 0 |
fb_performance_counters | fb_performance_counters | | | 1969-12-31T18:00:00-06:00 | 1969-12-31T18:00:00-06:00 | false | 0 |
fb_table_ddl | fb_table_ddl | | | 1969-12-31T18:00:00-06:00 | 1969-12-31T18:00:00-06:00 | false | 0 |
fb_views | fb_views | | | 1969-12-31T18:00:00-06:00 | 1969-12-31T18:00:00-06:00 | true | 8642560 | system table for views
skills | skills | | | 1969-12-31T18:00:00-06:00 | 1969-12-31T18:00:00-06:00 | true | 37998707 |