1.alter   table   [dbo].[SiteTracks]   drop   constraint   DF__SiteTrack__Audit__47DBAE45
2.ALTER TABLE  [dbo].[SiteTracks] DROP COLUMN  AuditOwnerId
3.alter table [dbo].[Project] add AuditOwner uniqueidentifier default '00000000-0000-0000-0000-000000000000' 
   alter table [dbo].[Project] add AuditType int default('0') not null
  alter table [dbo].[Project] add Note nvarchar(max) null

4.表一对多获取字段

select us.TrueName as '参赛人',us.Userschool as '参赛人学校',productname as '参赛项目', stuff((select  ';' + [dbo].[TeamInfos].username+'-'+

[dbo].[TeamInfos].userschool  from [dbo].[TeamInfos] where [dbo].[TeamInfos].ProductId= Pdu.id

and [dbo].[TeamInfos].isdelete=0 and [dbo].[TeamInfos].teamtype=0  for xml path('')),1,1,'') as '成员姓名-成员学校'
from [dbo].[Products] Pdu left join [dbo].[AspNetUsers] us on  Pdu.createid=us.id

 

相关文章:

  • 2019-07-05
  • 2021-11-28
  • 2021-09-17
  • 2021-11-18
  • 2021-09-17
  • 2021-12-22
  • 2021-12-22
猜你喜欢
  • 2021-08-15
  • 2021-08-25
  • 2021-08-15
  • 2021-08-07
  • 2021-12-22
  • 2021-12-22
  • 2021-10-12
  • 2021-11-28
相关资源
相似解决方案