一个存储过程问题,存储过程高手帮忙
ALTER proc Manage_GetForumList
as
select CategoryID, RootID, Layer, topiccounts, Description, Category,MasterID
from BBSCategory order by RootID,Layer
以上是一个选取bbs版面的存储过程,现在我要判断MasterID是不是空,如果是空,那么返回没有斑竹,如果不是空,则从users表里找到对应的id,并显示出斑竹名称。
请问,怎么搞,要对每一条记录进行这样的操作。