The test that appears in the following SQL Server and MySQL is a table (except for special instructions)
1. View the script created by the table
SQL Server:
Mysql:
Show create TABLE test;
2. View table structure
SQL Server
Sp_columns test;
Or
Sp_help test;
Mysql:
Show columns in test;
Or
DESC test;
3. See which tables are in the database
SQL Server:
Select name from sysobjects where xtype= ' U '
Mysql:
Select Table_name,table_rows from Information_schema.tables
where table_schema= ' TestDB '
This feeling MySQL do better, Infromation_schema is a database, the database has a view of the table, and our usual query statements have consistency, direct select column name from the table; Table_rows describes the current number of rows in this table.
Use INFORMATION_SCHEMA;
Select Table_name,table_rows from tables
where table_schema= ' TestDB '
Using workbench to connect to MySQL, you can select a database, right--schema Inspector
Here is a list of almost all the information you want about this database, including tables, columns, indexes, triggers, views, etc.
There's a simple way,
Use database name;
Show tables;
4. See what databases are available
Mysql:
show databases;