create proc p_book_select
@bTitle varchar(10)='',
@uName varchar(10)='',
@bStatus int= 0,
@bTId int=0
as
begin
select * from book where
(bTitle like '%'+@bTitle+'%' or @bTitle='') and
(uName=@uName or @uName='') and
(bStatus=@bStatus or @bStatus=0) and
(bTId=@bTId or @bTId=0)
end
三层:按条件查询
最新推荐文章于 2022-08-18 15:23:32 发布