Home  >  Article  >  Database  >  How to view the description of a MySQL temporary table?

How to view the description of a MySQL temporary table?

WBOY
WBOYforward
2023-08-26 09:09:05832browse

如何查看 MySQL 临时表的描述?

We can use the DESCRIBE statement to view the description of the MySQL temporary table, which is used to obtain the description of other MySQL tables. With the help of the following example, we can illustrate it -

Example

mysql> DESCRIBE SalesSummary;
+------------------+------------------+------+-----+---------+-------+
| Field            | Type             | Null | Key | Default | Extra |
+------------------+------------------+------+-----+---------+-------+
| product_name     | varchar(50)      | NO   |     | NULL    |       |
| total_sales      | decimal(12,2)    | NO   |     | 0.00    |       |
| avg_unit_price   | decimal(7,2)     | NO   |     | 0.00    |       |
| total_units_sold | int(10) unsigned | NO   |     | 0       |       |
+------------------+------------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

The above result set has a description of the temporary table "SalesSummary".

The above is the detailed content of How to view the description of a MySQL temporary table?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete