当前位置:网站首页>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;
边栏推荐
- LeetCode LCP 07. 传递信息
- How to access the traifik proxy dashboard using the rancher desktop
- Google Ads 竞价的运作机制
- Wechat applet - a case of comparing the size of numbers
- Manually tear the linked list (insert, delete, sort) and pointer operation
- 国资入股,建业地产这回稳了吗?
- PCA from 0 to 1
- php开发 博客系统的公告模块的建立和引入
- MP3 to Wav to Midi
- C language programming classic games - minesweeping
猜你喜欢

C language programming classic games - minesweeping

初探性能优化!从2个月到4小时的性能提升!

pca从0到1

What are the advantages of adaptive search advertising?

Why do we use Google search ads?

Data system provider Jidao technology joins dragon lizard community

Quatre schémas de mise en file d'attente des messages pour redis

Huawei, this is too strong

Wechat applet - a case of comparing the size of numbers

Unit tests in golang
随机推荐
Chinese Version Vocaloid AI Tuner Feasibility Test
Websocket is closed after 10 seconds of background switching
Wide match modifier symbol has been deprecated, do not use
联调这夜,我把同事打了...
“还是学一门技术更保险!”杭州校区小哥哥转行软件测试,喜提10K+双休!
聯調這夜,我把同事打了...
Design practice of rongyun Im on electron platform
Explore performance optimization! Performance improvement from 2 months to 4 hours!
如何为Excel中的单元格自动填充颜色
Linux(CentOS7)安裝MySQL-5.7版本
Leetcode 1005 maximized array sum after K negations
Watermelon video synchronization Tiktok also has benefits ~ the official "China Video Partner Program"
How to maximize the use of various matching methods—— Google SEM
自适应搜索广告有哪些优势?
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!
小程序111111
TIOBE - 2022年6月编程语言排行
LeetCode Algorithm 997. 找到小镇的法官
UoE UG2 Inf Course Research
Fatal error in launcher: unable to create process using