摘要:C#中海量数据的批量插入和更新 对于海量数据的插入和更新,ADO.NET确实不如JDBC做到好,JDBC有统一的模型来进行批操作.使用起来非常方便: PreparedStatement ps = conn.prepareStatement("insert or update arg1,args2..
阅读全文
摘要:cmd:wmic 查看cpu cmd:chkdsk 磁盘修复 chkdsk d: /F cmd :start /affinity XX conhost conhost这个程序在哪个cpu上进行 shift+home 行的首部 shift+end 行的尾部、 cmd:echo %path% 查看环境变
阅读全文
摘要:delete cnei45 from( Select Row_Number() Over(Partition by cost Order By cost asc ) As RowNumber , * from cnei45 ) cnei45 where cnei45.RowNumber >1
阅读全文
摘要:-- 创建唯一聚集索引 create unique clustered --表示创建唯一聚集索引 index UQ_Clu_StuNo --索引名称 on Student(S_StuNo) --数据表名称(建立索引的列名) with ( pad_index=on, --表示使用填充 fillfact
阅读全文
摘要:--全量更新create table pdata.dbo.customer(name varchar(255) ,type varchar(255) ,type_no varchar(255) ,address varchar(255) ,tel varchar(255) ) insert into
阅读全文
摘要:create table sdata.dbo. t_access_times(username varchar(255),month varchar(255),salary int)insert into sdata.dbo.t_access_times values ('A','2016-01',
阅读全文
摘要:create table sdata.dbo.onetest( Order_Source_Name varchar(255),Plant_Location_Number varchar(255),Plant_Location_Name varchar(255),Booked_Date varchar
阅读全文
摘要:求10月在哪个季度 select CEILING(convert(real,10)/3) REPLACE 下例用 xxx 替换 abcdefghi 中的字符串 cde。 SELECT REPLACE(''abcdefghicde'',''cde'',''xxx'')GO下面是结果集: abxxxfg
阅读全文
摘要:--根据EMP_ID求bug最多的--select EMP_ID,COUNT(1) bug_count,convert(varchar(7),DATE_FOUND,120) month_buginto sdata.dbo.emp_idbioafrom sdata.dbo.ERD_BUG awhere
阅读全文
摘要:查询出没门课程都大于80的学生的姓名 select name from table group by name having MIN(fenshu)>80 编号自增:identity(1,1) 删除除了编号以后,其他信息相同的信息自动编号 学号 姓名 课程名称 分数1 200 张三 数学 892 2
阅读全文
摘要:delete from sdata.dbo.mo_money insert into sdata.dbo.mo_money values ('mo','1000','2018-06-08') insert into sdata.dbo.mo_money values ('mo','12000','2
阅读全文
摘要:delete from sdata.dbo.mo_moneyinsert into sdata.dbo.mo_moneyvalues('make','3000','2018-06-12')insert into sdata.dbo.mo_moneyvalues('alex','400','2018-
阅读全文
摘要:--加载算法-- --全量覆盖 hive的写法是 insert overnrite table 表名 --sql 的写法是 select 字段名称 as 字段名称新 from 表名 增量追加 先删除p层里面的数据 delete from 表名 where 条件 inse into 表明 select
阅读全文
摘要:表值函数 返回一张表 SELECT * FROM sdata.dbo.taobaocarDROP function dbo.subd_day use pmartgocreate function dbo.subd_day(@priov varchar(255))returns tableas ret
阅读全文
摘要:select * from sdata.dbo.cost_detaildrop table sdata.dbo.cost_detail_now --根据SERVICE_ORDER_LINE 取最小的值 因为一个订单 可能换的很多零件,只统计一个--select * into sdata.dbo.co
阅读全文
摘要:select * from sdata.dbo.taobaoda --根据省市统计 cost的总钱数,收藏宝贝的数量,收藏店铺的数量,加入购物车的数量,点击的次数--select priov,city,SUM(cost) cost,SUM(baby)*0.2 baby,SUM(shop)*0.3 s
阅读全文
摘要:1、row_number() over()排序功能: (1) row_number() over()分组排序功能: 在使用 row_number() over()函数时候,over()里头的分组以及排序的执行晚于 where group by order by 的执行。 partition by 用
阅读全文
摘要:having 语句 WHERE 子句对被选择的列施加条件,而 HAVING 子句则对 GROUP BY 子句所产生的组施加条件。 SQL > SELECT ID, NAME, AGE, ADDRESS, SALARY FROM CUSTOMERS GROUP BY age HAVING COUNT(
阅读全文
摘要:--单子国家品牌日期 订单数select country_id ,product_group_ops --,case when service_order_creation_date ='00:00.0' then null -- else CAST(service_order_creation_d
阅读全文
摘要:select * from sdata.dbo.month_rateselect MAX(SERVICE_ORDER_CREATION_DATE) from sdata.dbo.cost_detailselect * from sdata.dbo.billing_data update sdata.
阅读全文