在Entity Framework中,从数据库生成模型,视图常报无主键。

解决办法:为试图添加主键/复合主键

create or replace view view_activebudgetamount
(activeid,budgetactiveid,flowid,applyyear,activestage,budgettype,amount,constraint view_activebudgetamount_pk primary key (activeid,flowid) rely disable novalidate)
as
  select a.activeid,a.activeid as budgetactiveid, b.flowid,b.year as applyyear, '1' as activestage ,'0016' as budgettype,nvl(a.totalamount,0) as amount from lb_activegoods a inner join lb_main b on a.activeid=b.activeid

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案