当前位置:网站首页>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;
边栏推荐
- [从零开始学习FPGA编程-19]:快速入门篇 - 操作步骤4-1- Verilog 软件下载与开发环境的搭建- Altera Quartus II版本
- Introduction to SVM
- Point cloud perception algorithm interview knowledge points (I)
- PHP development 09 article module deletion and article classification writing
- Operation of simulated examination platform of diazotization process examination question bank in 2022
- Don't write about the full screen explosion, try the decorator mode, this is the elegant way!!
- Simplified interpretation of accuracy and recall in AI papers
- How to buy children's serious illness insurance, what to pay attention to and how to choose products
- [popular science video] what is a lens antenna?
- LeetCode LCP 07. Deliver information
猜你喜欢

redis集群(cluster)+哨兵模式+主从(replicas)

Redis cluster + sentinel mode + replicas

阿里云oss文件上传系统

Wechat applet - a case of comparing the size of numbers

Sogou Pinyin official website screenshot tool pycharm installation

PyGame alien invasion

Operating mechanism of Google ads bidding

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

Kmeans from 0 to 1

华为联运游戏或应用审核驳回:应用检测到支付serviceCatalog:X6
随机推荐
"Xilin chain" of Southwest Forestry University passed the functional test of Electronic Standards Institute of the Ministry of industry and information technology | FISCO bcos case
LeetCode Algorithm 1791. Find the central node of the star chart
Three main factors determining advertising quality
LeetCode Algorithm 1791. 找出星型图的中心节点
感知机从0到1
Software engineering - system flow chart
广泛匹配修饰符符号已经被弃用,请勿使用
LeetCode LCP 07. Deliver information
Leetcode 1005 maximized array sum after K negations
Manually tear the linked list (insert, delete, sort) and pointer operation
MP3 to Wav to Midi
Database
Point cloud perception algorithm interview knowledge points (I)
How to restore the redis cluster and retain the complete cluster data after changing the node IP
Simulated 100 questions and simulated examination for safety management personnel of metal and nonmetal mines (small open pit quarries) in 2022
通过搜索广告附加信息让广告更具相关性
The establishment and introduction of the announcement module of PHP development blog system
【科普视频】到底什么是透镜天线?
Pagination writing of PHP security open 10 article list module
websocket 切后台10秒后 关闭掉了