la Sintassi
SHOW TABLES
Contenuto
- la Sintassi
- Descrizione
- Esempi
- Vedi Anche
Descrizione
SHOW TABLES elenchi nonTEMPORARY tabelle, le sequenze e le viste in un determinato database.
La clausola LIKE, se presente da sola, indica i nomi delle tabelle da abbinare. Le clausoleWHERE eLIKE possono essere fornite per selezionare le righe utilizzando condizioni più generali, come discusso in Extended SHOW., Per esempio, durante la ricerca per le tabelle del test database, il nome della colonna per l’uso nel WHERE e LIKE clausole Tables_in_test
FULL modificatore è supportato tale che SHOW FULL TABLES visualizza una seconda colonna di output. Valori per la seconda colonna. Table_type, sonoBASE TABLEper una tabella,VIEWper una vista eSEQUENCE per una sequenza.,
Puoi anche ottenere queste informazioni usando:
mysqlshow db_name
Vedi mysqlshow per maggiori dettagli.
Se non si dispone di privilegi per una tabella o una vista di base, non viene visualizzata nell’output da SHOW TABLESo mysqlshow db_name.
La tabella information_schema.TABLES, così come l’istruzione SHOW TABLE STATUS, forniscono informazioni estese sulle tabelle.
Esempi
SHOW TABLES;+----------------------+| Tables_in_test |+----------------------+| animal_count || animals || are_the_mooses_loose || aria_test2 || t1 || view1 |+----------------------+
Che mostrano le tabelle che iniziano con un solo.,
SHOW TABLES WHERE Tables_in_test LIKE 'a%';+----------------------+| Tables_in_test |+----------------------+| animal_count || animals || are_the_mooses_loose || aria_test2 |+----------------------+
Visualizzazione di tabelle e tipi di tabelle:
SHOW FULL TABLES;+----------------+------------+| Tables_in_test | Table_type |+----------------+------------+| s1 | SEQUENCE || student | BASE TABLE || v1 | VIEW |+----------------+------------+
Vedere anche
- MOSTRA LO STATO DELLA TABELLA
- L’information_schema.TABELLE tabella