数据库技术
WITH(NOLOCK)用法select * from( SELECT case sa.ActivityTimeType when 1 then sc.EndDate else sa.EndDate end as EndDate, sa.BeginDate, si.Sort, case si.Sec ...
分类:数据库技术 时间:2020-07-03 12:11:06 收藏:0 阅读:53
以前写了一篇关于PHP用PHPExcel导出MySQL数据到Excel表格 的文章。现在再写一篇PHP用PHPExcel导入Excel表格的数据到MySQL的文章,作为姊妹篇。 代码如下: 服务端: //上传方法 public function upload() { header("Content- ...
分类:数据库技术 时间:2020-07-03 12:02:15 收藏:0 阅读:72
mysql面试题 1、为什么一定要设一个主键? 2、你们主键是用自增还是UUID? 3、自增主机用完了怎么办? 4、主键为什么不推荐有业务含义? 5、货币字段用什么类型?? 6、时间字段用什么类型? 7、为什么不直接存储图片、音频、视频等大容量内容? 8、表中有大字段X(例如:text类型),且字段 ...
分类:数据库技术 时间:2020-07-03 11:59:41 收藏:0 阅读:36
create table test( id1 int , id2 int, id3 int, id4 int, key index_id12(id1,id2)); 用到索引explain select * from test where id1 < 10;用到索引explain select * f ...
分类:数据库技术 时间:2020-07-03 11:54:20 收藏:0 阅读:84
一:分列 MYSQL中可以使用SUBSTRING_INDEX进行分列 SUBSTRING_INDEX(s, delimiter, number) s 为需要分列的字段 delimiter 为分隔符 number则表示在取第几个分隔符旁边的字段 SUBSTRING_INDEX(s, delimiter ...
分类:数据库技术 时间:2020-07-03 11:01:18 收藏:0 阅读:66
挺久没有登录的 oracle 数据库,因为公司要求加固密码,登录后修改失败 1、启动数据库的同时启动控制文件、数据文件,提示:cannot mount database in EXCLUSIVE mode 2、启动数据库的同时启动控制文件、不启动数据文件,提示:database not mounte ...
分类:数据库技术 时间:2020-07-03 10:50:45 收藏:0 阅读:249
1. 判断数据库是否存在的两种方法: 一、用PDO判断数据库是否存在 二、用SQL语句判断 2. 方法一执行代码,如下: //$config['dsn']的表示如下$config["dsn"] => string(65) "mysql:host=127.0.0.1;port=3306;charset ...
分类:数据库技术 时间:2020-07-03 10:50:30 收藏:0 阅读:85
springboot项目采用java类配置Mybatis的数据源时,mybatis本身的核心库在springboot打包成jar后有个bug,无法完成别名的扫描, 加入 bean.setVfs(SpringBootVFS.class); 这个完美解决; ...
分类:数据库技术 时间:2020-07-03 10:47:02 收藏:0 阅读:274
SQL清空全部表数据 先执行select语句生成所有truncate语句 语句格式: select CONCAT('truncate TABLE ',table_schema,'.',TABLE_NAME, ';') from INFORMATION_SCHEMA.TABLES where tabl ...
分类:数据库技术 时间:2020-07-03 10:31:11 收藏:0 阅读:89
建表 create table 表名( 字段名 类型(长度) primary key, --约束条件 字段名 类型(长度) ); 插入(行) 插入单条数据 insert into table_1 values(280,6,2000,3000,4000,5000,6000); 用 union 插入多条 ...
分类:数据库技术 时间:2020-07-03 10:23:46 收藏:0 阅读:59
114511452145321955
上一页219544下一页
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!