Simple MySQL database operations

Source: Internet
Author: User

Simple MySQL database operations
1. Create a database

Use the show databases command to display the names of all created databases.
Create Database xxx; Create a database named XXX.

For example, mysql> Create Database test;

 

Ii. Create a form

Create Table XXX ();

For example:

Then you can run the DESC command to view the form:

For example:

3. insert data

Insert into XXX values (,); to complete the Insert Process. Then, run the SELECT command to view the specific information of the form.

For example:

4. Update Data

Update XXX set xx = xx where xx = xx; To update the form.

For example:

5. delete data

Use the delete from XXX Where xx = xx; command to delete data.

For example:

6. delete a database

Drop database xxx; to delete a database.

For example:

Related Article

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.