当前位置:网站首页>MySQL高级部分知识点
MySQL高级部分知识点
2022-06-12 01:44:00 【黑马金牌编程】
事务概念以及作用

视图概念以及操作

索引操作

安全管理

触发器

存储过程

数据库备份与还原

windows下MySQL其他知识番外篇:
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 新数据导入数据表中之前删除数据数据表中的所有信息
-f or --force 不管是否遇到错误,mysqlimport将强制继续插入数据
-i or --ignore mysqlimport跳过或者忽略那些有相同唯一
关键字的行, 导入文件中的数据将被忽略。
-l or -lock-tables 数据被插入之前锁住表,这样就防止了,
你在更新数据库时,用户的查询和更新受到影响。
-r or -replace 这个选项与-i选项的作用相反;此选项将替代
表中有相同唯一关键字的记录。
--fields-enclosed- by= char
指定文本文件中数据的记录时以什么括起的, 很多情况下
数据以双引号括起。 默认的情况下数据是没有被字符括起的。
--fields-terminated- by=char
指定各个数据的值之间的分隔符,在句号分隔的文件中,
分隔符是句号。您可以用此选项指定数据之间的分隔符。
默认的分隔符是跳格符(Tab)
--lines-terminated- by=str
此选项指定文本文件中行与行之间数据的分隔字符串
或者字符。 默认的情况下mysqlimport以newline为行分隔符。
您可以选择用一个字符串来替代一个单个的字符:
一个新行或者一个回车。
mysqlimport命令常用的选项还有-v 显示版本(version),-p 提示输入密码(password)等。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;
边栏推荐
- 如何提高广告的广告评级,也就是质量得分?
- php开发 博客系统的公告模块的建立和引入
- Software engineering - system flow chart
- Chinese Version Vocaloid AI Tuner Feasibility Test
- Freshman year: learning summary
- Data system provider Jidao technology joins dragon lizard community
- Google 搜索广告系列设置前有哪些准备工作?
- “還是學一門技術更保險!”杭州校區小哥哥轉行軟件測試,喜提10K+雙休!
- Sogou Pinyin official website screenshot tool pycharm installation
- 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!
猜你喜欢

PCA from 0 to 1

Sogou Pinyin official website screenshot tool pycharm installation

括号生成(回溯)

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

Go language learning summary (7) -- Dachang go programming specification summary

Data in the assembly cannot start with a letter! 0 before the beginning of a letter

Weekly CTF week 1: Amazing tapes

“還是學一門技術更保險!”杭州校區小哥哥轉行軟件測試,喜提10K+雙休!

【项目实训】微信公众号模板消息推送

博文推荐|BookKeeper - Apache Pulsar 高可用 / 强一致 / 低延迟的存储实现
随机推荐
感知机从0到1
Linux(CentOS7)安裝MySQL-5.7版本
Software engineering course: Chapter 2 software problem definition and feasibility analysis after class exercises
Lua function
【项目实训】微信公众号获取用户openid
Peewee module basic use -orm
如何为Excel中的单元格自动填充颜色
MySQL training report [with source code]
Huawei intermodal game or application review rejected: the application detected payment servicecatalog:x6
How to restore the redis cluster and retain the complete cluster data after changing the node IP
Don't write about the full screen explosion, try the decorator mode, this is the elegant way!!
LeetCode LCP 07. Deliver information
Tiobe - programming language ranking in June 2022
[project training] wechat official account to obtain user openid
Data in the assembly cannot start with a letter! 0 before the beginning of a letter
Operation of simulated examination platform of diazotization process examination question bank in 2022
Subject knowledge and educational ability of information technology in the first half of 2019 – subjective questions
How to access the traifik proxy dashboard using the rancher desktop
[project training] verification notes
竞价广告每次点击出价多少钱是固定的吗?