mysql
未来是什么样子
还是学生没啥好说的
展开
-
批量刷数据
DROP TABLE IF EXISTS `mgt_emp_resign_order_copy`;CREATE TABLE `mgt_emp_resign_order_copy` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `order_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单编号', `.原创 2021-03-20 17:28:22 · 224 阅读 · 1 评论 -
批量刷数据2
-- 批量更新有订单的数据-- 批量刷商机编码UPDATE IGNORE vip.mgt_emp_resign_order_copy o1 SET o1.lead_code = ( SELECT o2.lead_code FROM crm.crm_lead_order_rel o2 WHERE o1.order_code = o2.order_code ) WHERE EXISTS ( SELECT o3.id FROM crm.crm_lead_order_rel o3 WHERE o1.orde.原创 2021-03-20 17:28:05 · 146 阅读 · 1 评论 -
批量刷数据3
INSERT IGNORE INTO crm.crm_customer_public ( `cust_code`, `user_code`, `user_name`, `store_code`, `store_name`, `type`, `fell_time` ) SELECT l.cust_code, d.user_code, d.chinese_name, d.dept_code, d.dept_name, 1, "2020-09-04 12:12:12" FROM crm.crm_customer.原创 2021-03-20 17:27:13 · 126 阅读 · 1 评论 -
excel函数拼接sql语句
=CONCATENATE("INSERT INTO `crm`.`crm_enterprise_contract_copy`(`enterprise_name`, `start_time`, `end_time`,`create_time`,`update_time`) VALUES ('",B3,"','",C3,"','",D3,"','2020-09-25,','2020-09-25');")原创 2021-03-20 17:25:16 · 223 阅读 · 0 评论 -
mysql的防止重复插入
代码防止通过唯一编码在数据库获取是否存在通过sql防止insert into table (xxx) select xxx from dual where not exists(select cust_tel from crm_customer_detail_extra where cust_tel=#{custTel,jdbcType=VARCHAR})3.注解设置防止重复提交...原创 2020-06-11 14:35:12 · 190 阅读 · 0 评论