In MySQL Workbench gibt es eine Seite die Anzahl der Datensätze in jeder Tabelle in einer Datenbank zeigt?

StackOverflow https://stackoverflow.com/questions/4463640

  •  11-10-2019
  •  | 
  •  

Frage

In phpMyAdmin auf der Strukturseite für jede Datenbank, gibt es eine Tabelle, die alle die Tabellen in der DB und die Anzahl der Datensätze in jeder Tabelle zeigt. Gibt es etwas ähnliches in Workbech?

Danke.

War es hilfreich?

Lösung

Late answer but for anyone else who comes across this page the way to do this in MySQL Workbench 6.0 is:

  1. Right click the table in the Navigator pane
  2. Select "Table Maintenance..."
  3. Navigate to the "Indexes" tab
  4. Scroll to the right to find the "Cardinality" column.

This column shows you the number of values for each of the primary and navigation keys in the each table in your database. The number of values for your PRIMARY key is the number of rows. Hope that helps.

Another way is to:

  1. Right-click the database in the Navigator pane.
  2. Select "Schema Inspector".
  3. Navigate to the "Tables" tab, which will have a "Rows" column for each table in the database.

Andere Tipps

I dont know how to do it in MySQL Workbench but the following query returns the number of rows in a table.

SELECT COUNT(*) FROM table_name;

you should find this on the structure page : expand the "+ details ..." link

In the DataBase : "information_schema", you will find a "TABLES" table that contains tables of the server and a "TABLE_ROWS" field that contains the number of records.

A quick and dirty way to go about it is simply to do this query:

SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA = #YOUR-DB-NAME-HERE#

But you can also query than information from MySQL Workbench by going to the menu bar (on top) and choosing:

Edit -> SQL Editor -> Show Metadata Schemata

Now go to your tables as you would normally go (probably by "Open Connection to Start Querying" and you'll have there two new tables information_schema and performance_schema.

Open the information_schema table and you'll have there

table schema    table name       table_rows
your db name    you table name   number_of_rows

Hope this made things more usable.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top