随笔分类 - 杂七杂八
摘要:1、查询重复 select id,name from users where id in (select id from users group by id having count(id)>=2)2、去除重复 select distinct * from users3、子查询(sql增列)统计 select id=row_number()over(order by Le_NameOfAssociate),Le_NameOfAssociate as name,Le_ApplierID as userultcode,Year,(isnull((select SUM(CONVERT(int,
阅读全文
摘要:1.Themodelbackingthe'XXXXDBContext'contexthaschangedsincethedatabasewascreated.Eithermanuallydelete/updatethedatabase,orcallDatabase.SetInitializerwithanIDatabaseInitializerinstance.Forexample,theDropCreateDatabaseIfModelChangesstrategywillautomaticallydeleteandrecreatethedatabase,andoptiona
阅读全文