随笔分类 -  数据库

摘要:1.mysql -u root -p 输入密码 2.选择数据库 use database 2.导入文件csv文件 load data local infile 'E:\\tmp\\prod.csv' into table ${tableName} fields terminated by ',' l 阅读全文
posted @ 2023-05-23 09:45 KeepSmiling_me 阅读(68) 评论(0) 推荐(0) 编辑
摘要:version: '3' services: oracle: image: wnameless/oracle-xe-11g-r2 container_name: oracle11gr2 environment: - 'NLS_LANG=AMERICAN_AMERICA.AL32UTF8' volum 阅读全文
posted @ 2023-05-12 13:30 KeepSmiling_me 阅读(126) 评论(0) 推荐(0) 编辑
摘要:1.创建文件夹: D:/mysql_workspace/mysql/etc/mysql/data (存储mysql的数据目录) D:/mysql_workspace/mysql/etc/mysql/tmp (存储mysql的临时目录) D:/mysql_workspace/mysql/opt/mys 阅读全文
posted @ 2023-02-15 10:16 KeepSmiling_me 阅读(610) 评论(0) 推荐(0) 编辑
摘要:数据库表结构设计 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 阅读全文
posted @ 2023-02-06 13:24 KeepSmiling_me 阅读(27) 评论(0) 推荐(0) 编辑
摘要:假设有这么个需求,查询表中“名字第一个字是张,性别男,年龄为10岁的所有记录”。那么,查询语句是这么写的: mysq> select * from tuser where name like '张 %' and age=10 and ismale=1; 根据前面说的“最左前缀原则”,该语句在搜索索引 阅读全文
posted @ 2023-01-30 13:23 KeepSmiling_me 阅读(230) 评论(0) 推荐(0) 编辑
摘要:在 select 语句之前增加 explain 关键字,MySQL 会在查询上设置一个标记,执行查询时,会返回执行计划的信息,而不是执行这条SQL(如果 from 中包含子查询,仍会执行该子查询,将结果放入临时表中) CREATE TABLE `film` ( `id` int(11) NOT NU 阅读全文
posted @ 2023-01-30 13:10 KeepSmiling_me 阅读(100) 评论(0) 推荐(0) 编辑
摘要:alter user 'root'@'localhost' identified by '123456'; 阅读全文
posted @ 2021-10-12 09:17 KeepSmiling_me 阅读(44) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示