In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "instructions for MySQL to delete data tables". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
MySQL delete data table
Deleting tables in MySQL is very easy to operate, but you should be very careful when you delete tables again, because all data will disappear after executing the delete command.
Grammar
The following is the general syntax for deleting MySQL data tables:
DROP TABLE table_name; delete the datasheet in the command prompt window
In the mysql > command prompt window, the SQL statement to delete the data table is DROP TABLE:
Example
The following example deletes the data table runoob_tbl:
Root@host# mysql-u root-pEnter password:*mysql > use RUNOOB;Database changedmysql > DROP TABLE runoob_tblQuery OK, 0 rows affected (0.8 sec) mysql > use the PHP script to delete the data table
PHP uses the mysqli_query function to delete the MySQL data table.
This function takes two arguments and returns TRUE on successful execution, or FALSE otherwise.
H4 > grammar
Mysqli_query (connection,query,resultmode); parameter description connection is required. Specifies the MySQL connection to be used. Query is required, specifying the query string. Resultmode
Optional. A constant. It can be any of the following values:
MYSQLI_USE_RESULT (use this if you need to retrieve a large amount of data)
MYSQLI_STORE_RESULT (default)
Example
The following example uses the PHP script to delete the datasheet runoob_tbl:
Delete database
After successful execution, we can't see the runoob_tbl table by using the following command:
Mysql > show tables;Empty set (0.01sec) "MySQL Delete data Table instruction" ends here. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.