Database Operations and database operation statements
1. Create a database: Create database db name [database options]; tip: The statement must use the statement Terminator ";" to end the service. Identifier (Database Name) Naming rules: Case sensitivity depends on the current operating system. We recommend that you use the underline method. Characters of the identifier: any character, number, or even Chinese characters are used. However, some special combinations, such as combination of numbers only and special symbols, must be enclosed by an identifier qualifier. The qualifier: 'can be quoted in Chinese. However, the client must be encoded in the mysql data directory to form a directory named "database name. A file exists in the directory to save the options of the database. Db. opt2. database query view the current database: show databases; view the database creation statement: show create database db_name; 3. drop database db_name; 4. modify the database information Alter database db_name [modify command] modify the name: You can simply modify the directory name. Export the database content, create a new database, import the content, and delete the old database. When you create a new database, all the tables in the database are moved (renamed) to the new database to delete the old database.