摘要:
1.表中有id和name 两个字段,查询出name重复的所有数据 1 select * from xi a where (a.username) in (select username from xi group by username having count(*) > 1) 2、查询出所有数据进 阅读全文
摘要:
WITH RECURSIVE result ( id, GoodsTypeName, parentid) AS ( SELECT id, GoodsTypeName, parentid FROM goodstype WHERE id = 2 UNION ALL SELECT i.id, i.Good 阅读全文
摘要:
一:需求A表和B表的表结构相同,A表是历史表,B表是增量数据表;想要根据关联条件更新A表中的数据。 二:表结构CREATE TABLE `A` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `bid` bigint(20) NOT NULL , `sid` b 阅读全文
摘要:
private void TestDistinct() { Task.Run(() => { //生成测试数据 DateTime dt = DateTime.Now; Random rnd = new Random(); List<MyData> list = new List<MyData>(); 阅读全文