CMD build a database to build a table of some instructions.

Source: Internet
Author: User

Open MySQL 5.7 Command line Client in CMD.

1.cmd Display Enter password Enter your password when you log in to the database. Then here are some important instructions for creating databases and tables.

(1). Create DATABASE: creat table database name;

(2). Show the database you created (you have chosen the database you want to use): show databases;

(3). Delete database (use this directive with caution): Drop database name;

(4). Create Empty table: Create TABLE table name (

->id Int (3),

->name varchar (8),

->pasword varchar);(There will be no output and save as long as you do not end with a semicolon)

(5). The contents of the Display table: show tables;

(6). Rename table name: ALTER TABLE name rename to new table name;

(8). Add Field: ALTER TABLE name add email varchar (255) not NULL;

(9). Modify field Name: Alter TABLE field name change new field name;

(10). Delete field: ALTER TABLE name drop field name;

(11). Delete Table name: drop table name;

CMD build a database to build a table of some instructions.

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.