posts - 21, comments - 65, trackbacks - 11, articles - 0
  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理

公告

遇到了存储过程的麻烦

Posted on 2006-12-23 10:26 Hafeyang 阅读(118) 评论(4) 编辑 收藏
今天在写数据库的时候竟然发生了很低级的错误
在写存储过程时候
1create Procedure sp_SearchByKey
2    @Key nchar(20)
3As
4begin
5    --print @key
6    return select ar_content from article where ar_content like '%'+@Key+'%' 
7end
非常的顺利就创建成功了

然后

1exec sp_SearchByKey '通知'


结果让失望的很,没有记录

索性

1select * from article where ar_content like '%通知%'


返回了9条记录

这是为什么啊?