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

How to view the description of a MySQL temporary table?

WBOY
Release: 2023-08-26 09:09:05
forward
859 people have browsed it

如何查看 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)
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template