MySQL has a couple of features:
1: Multi-lingual support
2: Can be good portability
3: Free Open source
4: Efficient (multi-threading support, full utilization of CPU resources, very fast running)
5: Large data query and storage support
6: Easy to learn and easy to operate
In fact, the database is to use a table to store the data, the data in this table to increase the deletion and check, you can complete a database basic functions:
There are several aspects to a table:
Header (header): Name of each column
Column (ROW): A collection of data with the same data type
Row (COL): Each line is used to describe the specific information of a person/thing
Key: A method used to identify a particular person \ object, and the value of the key is unique in the current column
Value: The specific information for the row, each value must be the same as the data type of the column;
The MySQL data type has the following aspects:
integers: tinyint, smallint, mediumint, int, bigin
Floating point number
float, double, real, decimal
Date and time
Date, time, DateTime, timestamp, year
String type
String
char, varchar
Text
Tinytext, text, Mediumtext, Longtext
Binary (used to store pictures, music, etc.)
Tinyblob, BLOBs, Mediumblob, Longblob
After we have learned this, we can do the command operation of the database:
We operate in the CMD panel:
Link MySQL
Mysql-h host Address-u user name (root)-p user Password admin
Create a database
Create databases < database name >;
Display Database
show databases;
Working with databases
Use < database name >;
Deleting a database
Drop databases < database name >;
Create a data table
CREATE table < table name > (< Field name 1> < type 1> [,.. < Field name N> < type n>]);
Get table structure
DESC table name;
Show data table
Show tables;
Delete a data table
DROP table < table name >;
Modify Table name *
Rename table name to new table name;
Inserting data
INSERT into < table name > [(< Field name 1>[,.. < field name n >])] VALUES (value 1) [, (value N)];
Querying data
Select < Field 1, Field 2, ...> from < table name > where < expression >;
SELECT * FROM < table name > where < expression >; Query all
modifying data
Update table name Set field = new value,... where condition;
Delete data
Delete from table name where expression;
MySQL's instructions