22,199
社区成员
发帖
与我相关
我的任务
分享
ALTER View QueryCustomer as
select '列名1' as CustomerCodec,'列名2'as CustomerName,'列名3'as sex,'列名4'as Birthday,
'列名5'as Age,'列名6'as Email,'列名7'as Mobile,'列名8'as Marriage, '列名9' as Document,'1' as sortid
union all
select c.CustomerCode,c.CustomerName,c.sex,c.Birthday,c.Age,c.Email,c.Mobile,c.Marriage,c.Document,'2' as sortid
from Customer_SearchTemp cs
inner join Customer c on cs.CustomerCode=c.CustomerCode
ALTER View QueryCustomer as
select '列名1' as CustomerCodec,'列名2'as CustomerName,'列名3'as sex,'列名4'as Birthday,
'列名5'as Age,'列名6'as Email,'列名7'as Mobile,'列名8'as Marriage,c.Document,'1' as sortid
union all
select c.CustomerCode,c.CustomerName,c.sex,c.Birthday,c.Age,c.Email,c.Mobile,c.Marriage,c.Document,'2' as sortid
from Customer_SearchTemp cs
inner join Customer c on cs.CustomerCode=c.CustomerCode
select * from QueryCustomer where ..
order by sortid asc