union top n 가져오기 정보
HTML union top n 가져오기본문
select top 8 -- 상위 8개만 가져올때 사용합니다.
b_index, b_subject, b_date, b_xgg, b_xd
from (
select b_index, b_subject, b_date, b_xgg, b_xd from a where b_xgg='1'
union all
select b_index, b_subject, b_date, b_xgg, b_xd from b where b_xgg='1'
union all
select b_index, b_subject, b_date, b_xgg, b_xd from c where b_xgg='1'
union all
select b_index, b_subject, b_date, b_xgg, b_xd from d where b_xgg='1'
) a
order by b_index desc<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:27:00 MySQL에서 이동 됨]</div>
b_index, b_subject, b_date, b_xgg, b_xd
from (
select b_index, b_subject, b_date, b_xgg, b_xd from a where b_xgg='1'
union all
select b_index, b_subject, b_date, b_xgg, b_xd from b where b_xgg='1'
union all
select b_index, b_subject, b_date, b_xgg, b_xd from c where b_xgg='1'
union all
select b_index, b_subject, b_date, b_xgg, b_xd from d where b_xgg='1'
) a
order by b_index desc<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:27:00 MySQL에서 이동 됨]</div>
추천
0
0
댓글 1개
top 8은 M$SQL에서 가능합니다.