Get the App
SLTechnology News&Howtos  ›  Database  › 

How mysql clears the database in the table

Shulou Source: shulou.com Published: 2022-06-01 03:48:52 09月30日 Update

Today, I will talk to you about how mysql empties the database in the table. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

How mysql clears the database in the table

1. Enter MySQL

Mysql-hlocalhost-uroot-p

two。 Query all table names in the database

Select table_name from information_schema.tables where table_schema='DB_name' and table_type='base table'

3. Query all field names of the specified table in the database

Select column_name from information_schema.columns where table_schema='DB_name' and table_name='users'

4. Empty the data of the table in the database

Truncate table table name; MySQL is a relational database management system, developed by the Swedish company MySQL AB, is a product of Oracle. MySQL is one of the most popular relational database management systems. In the aspect of WEB application, MySQL is one of the best RDBMS (Relational Database Management System) application software. MySQL is a relational database management system in which relational databases store data in different tables instead of all data in one large warehouse, which increases speed and flexibility.

After reading the above, do you have any further understanding of how mysql empties the database in the table? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Tags: Data database management system system management content application query different middle finger middle finger middle table product company field library application software aspect more best Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Xiaomi MariaDB Docker Apple