COUNT SINGLE_TABLE RULE

Description

The COUNT SINGLE TABLE syntax is used to query number of single table for specified database.

Syntax

Grammar Railroad diagram

  1. CountSingleTable::=
  2. 'COUNT' 'SINGLE' 'TABLE' ('FROM' databaseName)?
  3. databaseName ::=
  4. identifier

Supplement

  • When databaseName is not specified, the default is the currently used DATABASE. If DATABASE is not used, No database selected will be prompted.

Return Value Description

ColumnDescription
databaseThe database name where the single table is located
countThe count of single table

Example

  • Query the number of single rules for specified database.
  1. COUNT SINGLE TABLE
  1. mysql> COUNT SINGLE TABLE;
  2. +----------+--------+
  3. | database | count |
  4. +----------+--------+
  5. | ds | 2 |
  6. +----------+--------+
  7. 1 row in set (0.02 sec)

Reserved word

COUNT, SINGLE, TABLE, FROM