상세 컨텐츠

본문 제목

카페명 및 가입된 회원여부 알아오기

청강컴정/09DataBase중간고사

by luckey 2009. 4. 24. 08:41

본문

create proc cName(@cNum int, @mID varchar(20))
as
begin
select name as cName,
cafe_manage.dbo.nullNum((
select count(*) from member_join as mj
inner join member as mb
on mj.fk_member = mb.sn
where mj.fk_cafe = 1
group by mb.id
having mb.id=@mID)) as cnt
from cafe
where sn = @cNum
end

관련글 더보기

댓글 영역