Mysql database basic notes bitsCN.com go to the installation directory.../bin/mysql.exe
Cd Change Directory dir list all files in the current directory
C:/vesa/.../a> angle brackets indicate that they are in the folder of disk c/vasa /.../.
Cd space... indicates the directory to the upper level
Cd space directory name indicates entering the specified directory
Cd space ted Key indicates viewing directory names in sequence
> Mysql space-u user name-p password (that is, connect to the database through the user name and password)
Show databases; show all databases
Use database name; indicates entering the database
Show tables; show all data tables
Select * from data table name; view data in the data table
Insert: insert into field name (this field is omitted and not written) values value; (field name 1-> value 1 field name 2-> value 2... the same number of orders)
Update: update table name: set field name = value; (where field name = value and field name = value)
Query: select field list from table name; (where field name = value and field name = value)
Delete: delete from table name; (where field name = value and field name = value)
Create database: database name;
Delete list: drop table name ...;
Delete database: drop database name;
View table attributes: describe table name;
Modify table attributes: alter table name modify column field name type;
Modify table Name: name of the table after the original table name to rename table;
Create a data table: create table data table name (Item Name type..., item name type...,...); bitsCN.com
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