摘要:
一、背景: 大数据量的表, 数据行数增多,影响表的管理(删查改)和性能 二、原理:把一个表中的行进行划分,归为几部分 三、优点: 1、改善大型表的查询性能, 通过查询对应分区表中,对应的数据,而不查询整个表 2、分区表的数据存储在各个分区中,备份分区,可以快速恢复对应分区的数据,不需要对全表数据进行 阅读全文
摘要:
1、单字段去重 select distinct aly_layer from t_aly_il_result 2、多字段去重 select distinct aly_layer,CREATE_TIME from t_aly_il_result 3、对去重字段进行统计 select count(dis 阅读全文
摘要:
1、常用 语法结构:update 表名 set 列名1=值1,列名2=值2,列名3=值3..... where 条件 update student t set t.age = '24', t.idnumber = '3503021994XXXXXXXX' where t.stuname = '张三' 阅读全文
摘要:
一、存在下表,需插入数据 1、全部字段 insert into cs2 values ('If89bb5d65c44e7f0165c63e23950ed3',2) ; 2、部分字段 insert into cs2 (up_inst_id,ALY_LAYER) values ('If89bb5d65c 阅读全文
摘要:
一、新表不存在 1、create table cs as select * from t_aly_il_result 备份结构和数据 2、create table cs1 as select * from t_aly_il_result where 1 = 0 复制结构 3、create table 阅读全文