当前位置:网站首页>MySQL advanced knowledge points
MySQL advanced knowledge points
2022-06-12 01:50:00 【Dark horse gold medal programming】
Transaction concept and function

View concept and operation

Index operation

security management

trigger

stored procedure

Database backup and restore

windows Next MySQL Other knowledge :
c:\mysql\bin\mysqldump -uroot -proot staffer>e:\staffer.sql
c:\mysql\bin\mysql -uroot -proot staffer<staffer.sql
c:\mysql\bin\mysqldump -uroot -proot --databases staffer>e:\staffer.sqlmysql -uroot -proot >e:\staffer.sql
-d or --delete Delete all information in the data table before importing new data into the data table
-f or --force Whether or not you've made a mistake ,mysqlimport Will force continued insertion of data
-i or --ignore mysqlimport Skip or ignore those that have the same unique
Keyword line , Data in the import file will be ignored .
-l or -lock-tables Lock the table before data is inserted , This prevents ,
When you update the database , User queries and updates are affected .
-r or -replace This option is related to -i Options do the opposite ; This option will replace
Records with the same unique keyword in the table .
--fields-enclosed- by= char
When specifying the record of data in a text file, it is enclosed by , In many cases
The data is enclosed in double quotation marks . By default, data is not enclosed by characters .
--fields-terminated- by=char
Specifies the separator between the values of individual data , In a period separated file ,
The separator is a period . You can use this option to specify the separator between the data .
The default separator is the skip (Tab)
--lines-terminated- by=str
This option specifies the string to separate data between rows in a text file
Or characters . By default mysqlimport With newline For line separator .
You can choose to replace a single character with a string :
A new line or a return .
mysqlimport The common options of the command are -v Display version (version),-p Prompt for password (password) etc. .mysql> DESCRIBE MYTABLE;
mysql> insert into MYTABLE values ("hyq","M");
mysql> LOAD DATA LOCAL INFILE "D:/mysql.txt" INTO TABLE MYTABLE;
mysql>use database;mysql>source d:/mysql.sql;
mysql>delete from MYTABLE;
mysql>update MYTABLE set sex="f" where name='hyq';
UPDATE [LOW_PRIORITY] [IGNORE] tbl_name
SET col_name1=expr1 [, col_name2=expr2 ...]
[WHERE where_definition]
[ORDER BY ...]
[LIMIT rows]
or
UPDATE [LOW_PRIORITY] [IGNORE] tbl_name [, tbl_name ...]
SET col_name1=expr1 [, col_name2=expr2 ...]
[WHERE where_definition]mysql> UPDATE persondata SET age=age+1;
mysql> UPDATE persondata SET age=age*2, age=age+1;
UPDATE items,month SET items.price=month.priceWHERE items.id=month.id;
边栏推荐
- Prism框架初识-模块化介绍
- Make ads more relevant by searching for additional information about ads
- “中国东信杯”广西大学第四届程序设计竞赛(同步赛)
- TIOBE - 2022年6月编程语言排行
- 华为,这也太强了吧..
- In 2022, the internal promotion of the "MIHA Tour" golden, silver and silver social recruitment started in April and march! Less overtime, good welfare, 200+ posts for you to choose, come and see!
- Concepts of programs, processes, and threads
- 竞价广告每次点击出价多少钱是固定的吗?
- [popular science video] what is a lens antenna?
- Simplified interpretation of accuracy and recall in AI papers
猜你喜欢

pca从0到1

Perceptron from 0 to 1

Introduction to prism framework - Modular introduction

Unit tests in golang

Spiral matrix (skill)

PyGame alien invasion

为什么我们要使用谷歌搜索广告?

How to stop anti-virus software from blocking a web page? Take gdata as an example

Three main factors determining advertising quality

In 2022, the internal promotion of the "MIHA Tour" golden, silver and silver social recruitment started in April and march! Less overtime, good welfare, 200+ posts for you to choose, come and see!
随机推荐
[untitled]
Modification of system module information of PHP security development 12 blog system
Database
php安全开发 12博客系统的 系统模块信息的修改
In 2022, the internal promotion of the "MIHA Tour" golden, silver and silver social recruitment started in April and march! Less overtime, good welfare, 200+ posts for you to choose, come and see!
Huawei intermodal game or application review rejected: the application detected payment servicecatalog:x6
Loop loop and CX
小程序111111
Invert words in a string (split, double ended queue)
A mystery of the end of vagrant up
How to restore the redis cluster and retain the complete cluster data after changing the node IP
华为,这也太强了吧..
Three main factors determining advertising quality
Advantages of Google ads
LeetCode Algorithm 997. 找到小镇的法官
Simulated 100 questions and simulated examination for safety management personnel of metal and nonmetal mines (small open pit quarries) in 2022
"C'est plus sûr d'apprendre une technologie!" Hangzhou Campus Little Brother transfer software test, Hi - Ti 10K + double break!
The resignation of the chief oracle engineer was furious: MySQL is a terrible database, so it is recommended to consider PostgreSQL!
Linux (centos7) installer mysql - 5.7
Concepts of programs, processes, and threads