reate procedure b_category;1 (@category varchar(50)=null) as begin select * from book where bno in ( select bno from book_category where cname like '@category%') end ---- execute b_category;1 文学 ---- select * from book where bno in ( select bno from book_category where cname like '文学%')-------------------------------这个就可以查询出来,是为什么呢
我最最主要的问题是,我查询不出数据。 create procedure b_category;1 (@category varchar) as begin select * from book where bno in ( select bno from book_category where cname =@category) end