Database Operations and database operation statements

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.