Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A brief Analysis of several commands in MySQL

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following content mainly brings you a brief analysis of several MySQL commands, the knowledge mentioned here, which is slightly different from books, is summed up by professional and technical personnel in the process of contact with users, and has a certain value of experience sharing, hoping to bring help to the majority of readers.

1) there are 3 ways to start MySQL service

1. Manual.

2. Cmd-- > services.msc opens the window of the service

3. Use the administrator to open cmd

* net start mysql: start the service of mysql

* net stop mysql: disable the mysql service

MySQL login: mysql-uroot-p password

SQL classification

1) DDL data definition language: create, show, alter, drop

2) DML (Data Manipulation Language) data manipulation language: add, delete and modify

Keywords: insert, delete, update

3) DQL (Data Query Language) data query language: keywords: select, where, etc.

4) DCL (Data Control Language) data control language (understanding)

DDL: define database objects: databases, tables, columns

C=Create create database: create database database name

R=Retrieve queries the names of all databases: show databases

U=Update modifies the character set of the database: alter database database name character set character set name

D=Delete delete database: drop database database name

DML

1. Add data: insert into table name (column name 1, column name 2. Column name n) values (value 1, value 2... Value n)

Replicated table: create table table name like replicated table name

two。 Delete data: delete from table name [where condition]

TRUNCATE TABLE table name;-- it is recommended to delete the table first and then create the same table.

3. Modify data: update table name set column name 1 = value 1, column name 2 = value 2. [where condition]

DQL: record select field in query table from table name where condition list

For a brief analysis of the above commands about MySQL, if you need to know more, you can continue to pay attention to the innovation of our industry. If you need professional answers, you can contact the pre-sales and after-sales on the official website. I hope this article can bring you some knowledge updates.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report