union top n 가져오기 > 퍼블리셔팁

퍼블리셔팁

퍼블리싱과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.

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>
추천
0
  • 복사

댓글 1개

© SIRSOFT
현재 페이지 제일 처음으로