Modify database [MySQL] [database]

Modify the database

First of all, we need to know that we generally do not modify the database in actual programming, because once our database is created, especially if we add a lot of data to the database, it will cost a lot of money to modify the database. A big price. If we have not added data to a database after we have created it, it is still meaningful for us to modify the database at this time.

We generally modify the database in two ways, as follows:

  1. Change database character set
ALTER DATABASE 数据库名 CHARACTER SET 字符集;
  • CHARACTER SET above can be replaced with CHARSET
  1. Modify the database name (only in some visualization tools)
  • In fact, the database cannot be renamed. In some visualization tools, it can be renamed. In fact, a new database is created, and then the contents of the old database are copied to the new database, and then our old database is deleted, so We do not go into details here

Summary: Our operations to modify the database rarely appear in actual programming, and we rarely use

Guess you like

Origin blog.csdn.net/m0_57001006/article/details/123490043