日期:2014-05-17 浏览次数:20411 次
select *,Row_Number() over(order by id)as Row
from
(
select id,title,[content] from t_news where title like '%童丽%'
union
select id,title,[content] from t_news where [content] like '%童丽%'
)t
where Row between 3 and 5
SELECT * FROM
(
select *,Row_Number() over(order by id)as Rowid
from
(
select id,title,[content] from t_news where title like '%童丽%'
union
select id,title,[content] from t_news where [content] like '%童丽%'
) t
) m
where Rowid between 3 and 5
select *
from
(select id,title,[content],Row_Number() over(order by id)as Row
from t_news
where title like '%童丽%' or [content] like '%童丽%'
)t
where Row between 3 and 5