多问一下,怎么把几个字段的合到一起做唯一主键,就是视图命令中如何把ID,编号,日期,供应商,凭证字号,经办人,金额全部串起来作为唯一值。
如下:SELECT fy1.ID, fy1.编号,日期,供应商,凭证字号,,经办人,支出 as 金额 FROM 费用1 as fy1 inner join 信息 as xm on xm.编号 = fy1.编号
union all
SELECT fy2.ID, fy2.编号,发生日期 as 日期,null as 供应商,null as 凭证字号,经办人,金额 FROM 费用2 as fy2 inner join 信息 as xm on xm.编号 = fy2.编号
|