I have to know the basic mysql operations

Source: Internet
Author: User
MYSQL basic statement 1. createdatabase database name; Create Database Type 2. showdatabase; show all database information 3. use Database Name; select database 4. dropdatabase database name; delete database 5. createtable table name (field name 1 type, field name 2 type) Create Table 6. showcloumsfrom

MYSQL basic statement 1. createdatabase database name; Create Database Type 2. show database; show all database information 3.use database name; select database 4. drop database name; delete database 5. create table Name (field name 1 type, field name 2 type) create table 6. show cloums from

Basic MYSQL statements

1. Create database name;

Create Database Type

2. show database;

Show all database information

3. use Database Name;

Select Database

4. drop database name;

Delete Database

5. create table Name (field name Type 1, field name Type 2)

Create a table

6. show cloums from database name. Data Table Name

Display the specified table structure

7. desc table name;

Displays the structure of a field in a table.

8. alter table name Operation keyword specific operation

Modify Table

9. rename table old table name to new table name

Change table name

10. Drop table name;

Delete table name

11. insert into Table Name (field name 1, field name 2) values (corresponding value 1, corresponding value 2 );

Insert table

12. Concat () joins multiple columns

The concat function can combine multiple fields to form a string.

Select concat (name, ":", age) from user;

13. limit the number of queried rows

Select * from table name limit 2, 3

It means reading 3 records in a row from the second record

14. sum () summation

15. Update table name set field name = corresponding value where Condition

Update table

16. delete from table name where Condition

Delete records in a table

17.

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.