Create and delete an instance for a mysql database

Source: Internet
Author: User
Tags mysql tutorial

Create database syntax

Create database tutorial name

Create and name a database. To use create database, you must obtain the create permission for the database.

Alter table syntax

Alter [ignore] table tbl_name

Alter table is used to change the structure of the original table. For example, you can add or delete columns, create or cancel indexes, change the type of original columns, or rename columns or tables. You can also modify the table comment and table type.

In the changes allowed, the syntax of many clauses is similar to that of the clauses in create table. This includes table_options modification. The options include engine, auto_increment, and avg_row_length.

Note:

To use alter table, you must obtain the alter, insert, and create permissions for the table.

Ignore is an extension of the mysql tutorial to the standard SQL. If there are duplicate keywords in the new table, or a warning appears when strict mode is enabled

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.