MySQL DDL statement (data definition language)

Source: Internet
Author: User

1.create database YXM; Create a database

2.drop database YXM; Deleting a database

3.create table YXM; Create a table

4.drop Table yxm;//Delete tables

5.alter Table YXM Modify Yname varchar (20); modifying table Types

6.alter table yxm Add column age int (3); Add Table field

7.alter table yxm drop column age; Delete a table field

8.alter table YXM Change age Age1 int (4);//Field rename

9.alter table YXM Add birth date after ename; Increase the date type's birth field behind the Ename field.

10.alter table YXM Modify age int (3) first; Modify the field age to put it in front.

11.alter table YXM Rename yxm1; Change the table name Yxm to YXM1.

MySQL DDL statement (data definition language)

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.