Home >Database >Mysql Tutorial >How to solve the problem that objects already exist in the database
Solutions to objects that already exist in the database: 1. Add the "IF OBJECT_ID ('table name') IS NOT NULL DROP PROCEDURE table name; GO" statement before the create statement; 2. Modify the table name. Rerun.
The operating environment of this tutorial: windows7 system, mysql8.0 version, Dell G3 computer.
This situation usually occurs when running the SQL statement again. There are two ways to solve it:
1. Add:
IF OBJECT_ID ( '表名' ) IS NOT NULL DROP PROCEDURE 表名; GO
2. Sometimes Because the main code of the database to be deleted is used in other tables, it cannot be deleted. At this time, you can rerun it by modifying the table name.
Related recommendations: "mysql tutorial"
The above is the detailed content of How to solve the problem that objects already exist in the database. For more information, please follow other related articles on the PHP Chinese website!