Open the script (including creating a database, creating a table, and adding data) in the graphic interface management tool MySqlQueryBrowser, and execute the script without any problems. However, when using the mysql command line tool to execute a database creation script, if the added data contains Chinese characters, the stored data is garbled or ???... Solution 1: Find my. ini in the MySql installation directory,
Open and execute the script (including creating a database, creating a table, and adding data) in the graphic interface management tool MySql Query Browser without any problems; however, when you use the mysql command line tool to execute a database creation script, if the added data contains Chinese characters, the stored data is garbled or ???... Solution 1: Find my. ini in the MySql installation directory,
Open and execute the script (including creating a database, creating a table, and adding data) in the graphic interface management tool MySql Query Browser without any problems; however, when you use the mysql command line tool to execute a database creation script, if the added data contains Chinese characters, the stored data is garbled or ???...
Solution 1: Find my. ini: change default-character-set = latin1 in [mysql] To default-character-set = utf8, save the settings, and restart the MySql service to import data from the command line. Disadvantages: the user's computer may not be able to be configured due to deployment, so the method will be useless...
Solution 2: Add a set character set utf8 line at the beginning of the database script file, add the default character set utf8 after the database name, and add the default charset = utf8 ;, add a set character set utf8; line before adding data.
Note: The MYSQL version I used is 5.1. I am also a beginner. I may have said something wrong or not. Please leave a message to me. Thank you.
Appendix: My database creation script (some code ):
Set character set utf8;
Drop database if exists database Name
Create database name default character set utf8;
Use Database Name;
/* ===================================================== ======================================= */
/* Table: Table name */
/* ===================================================== ======================================= */
Drop table if exists table name;
Create table Name (
PID int AUTO_INCREMENT,
PName nvarchar (20) null,
Remark nvarchar (50) null,
Constraint PK_POSITION primary key (PID)
) Default charset = utf8;
/* ===================================================== ===================== */
/* Add data */
/* ===================================================== ===================== */
Set character set utf8;
Insert table name (PName, Remark) values ('1 ,'');
Insert table name (PName, Remark) values ('2 ,'');
Oracle
In fact, the Package concept is somewhat novel because it is not used much.
Because it is compatible with JAVA, this database is basically required for systems developed in JAVA.
Since IBM has acquired a lot of open-source JAVA projects, and it is not inferior to databases, so I don't know which year I bought El, and then packaged it into a BI system, cloud computing system, and so on.