首页 MsSql教程 sql-server-2008 – “无法找到存储过程”,即使已在MS SQL Serve

sql-server-2008 – “无法找到存储过程”,即使已在MS SQL Serve

我在数据库testbase中创建了一个表testtable,它具有以下结构:

product_no (int,not null)
product_name (varchar(30),not null)
price (money,null)
expire_date (date,null)
expire_time (time(7),null)

我使用的是Microsoft SQL Server 2008 Management Studio.

我创建了一个存储过程testtable_pricesmaller,如下所示

use testbase
go
create procedure testtable_pricesmaller
    @pricelimit money
as
select * from testtable where price = @pricelimit;
go

并能够在Microsoft SQL Server Management Studio的对象资源管理器上查看存储过程. (它在对象资源管理器的以下树结构中列出)

Databases
    + testbase
        + Tables
            + dbo.testtable
        + Programmability
            + Stored Procedures
                + dbo.testtable_pricesmaller

当我收到以下错误时,我觉得很奇怪:

Could not find the stored procedure 'dbo.testtable_pricesmaller'.

当我执行以下SQL语句时:

execute dbo.testtable_pricesmaller 50

它会丢失什么?

解决方法

IntelliSense刷新本地缓存应该修复它

关于作者: dawei

【声明】:佛山站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

热门文章