select top 20 id, username as title,
shijian as joindate, 3 as ctype
from house.house.house_hz
order by id desc
union
select top 20 id, house_name as title,
shijian as joindate, 1 as ctype
from house.dbo.house_esf where type=0
order by id desc
union
select top 20 id, house_name as title,
shijian as joindate, 1 as ctype
from house.dbo.house_esf where type=1
order by id desc出错了,如何解决?
shijian as joindate, 3 as ctype
from house.house.house_hz
order by id desc
union
select top 20 id, house_name as title,
shijian as joindate, 1 as ctype
from house.dbo.house_esf where type=0
order by id desc
union
select top 20 id, house_name as title,
shijian as joindate, 1 as ctype
from house.dbo.house_esf where type=1
order by id desc出错了,如何解决?
shijian as joindate, 3 as ctype
from house.house.house_hz
union
select top 20 id, house_name as title,
shijian as joindate, 1 as ctype
from house.dbo.house_esf where type=0
union
select top 20 id, house_name as title,
shijian as joindate, 1 as ctype
from house.dbo.house_esf where type=1
order by id desc
shijian as joindate, 3 as ctype
from house.house.house_hz
order by id desc)a
union
select * from (select top 20 id, house_name as title,
shijian as joindate, 1 as ctype
from house.dbo.house_esf where type=0
order by id desc)b
union
select * from (select top 20 id, house_name as title,
shijian as joindate, 1 as ctype
from house.dbo.house_esf where type=1
order by id desc)c