次の構造を持つテーブルtesttableをデータベース内に作成しましたtestbase。
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
Object ExplorerMicrosoft SQL Server Management Studioでストアドプロシージャを表示できます。(次のツリー構造にリストされていますObject Explorer)
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
何が欠けているのでしょうか?
USEステートメントを追加しましたが、エラーが発生しました。
IntelliSense Refreshローカルキャッシュで修正する必要があります