摘要:
如 有个表里有字段id,name,.....当name是重复时取其id最大的一条记录 select max(id) id,name from 表 group by name --最小用mini--如果表中还有其他字段要查出,那么select * from 表 where id in(select m 阅读全文
摘要:
ALTER PROCEDURE [dbo].[sp_updateStuStateYRCode] @StuId varchar(100)ASBEGIN update StuState set KM1YR_Code=0,KM2YR_Code=0,KM3YR_Code=0 where Stuid=@Stu 阅读全文
摘要:
string sql = @"update a set a.M_ParentID=b.M_ParentID, a.M_Name=b.M_Name, a.M_Seq=b.M_Seq from SysMenu_BySchool a inner join ("; foreach (SysMenu_BySchoolEntity m in lstMenu) { sql += string.Format(... 阅读全文
摘要:
SELECT @Count=COUNT(Id) FROM #RecordTemp SET @i=0 WHILE @i<@Count BEGIN SET @i=@i+1 SELECT @Id=Id,@CoachIcNo=CoachIcNo,@StuIcNo=StuIcNo,@BeginTime=BeginTime,@EndTime=EndTime, @ActualTime=ActualTime... 阅读全文
摘要:
USE [DB_JP_BaseInfo00] GO /****** Object: StoredProcedure [dbo].[sp_wx_getAppointmentInfo_Str] Script Date: 03/22/2016 14:48:24 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ... 阅读全文