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
댓글 영역