How to write store procedure ?
-
Dear Sir I created New Package by wizard in SQL server 2000. I want to write store procedure to execute it but i don't know how to write it. could you tell me how to write it?
-
Dear Sir I created New Package by wizard in SQL server 2000. I want to write store procedure to execute it but i don't know how to write it. could you tell me how to write it?
SaravuthYos wrote:
SQL server 2000. I want to write store procedure
See the documentation: CREATE PROCEDURE[^] and EXECUTE[^]
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog
-
Dear Sir I created New Package by wizard in SQL server 2000. I want to write store procedure to execute it but i don't know how to write it. could you tell me how to write it?
Stored Procedure =================== create procedure dbo.myProcAS selet * from customers go ===================== running this exec myProc Parameter Stored Procedure ============================= create procedure dbo.MyProc @CustNumber int AS SELECT * from customer WHERE CustomerID = @CustNumber go ============================= running this exec myProc 1001 Look where you want to go not where you don't want to crash. Bikers Bible
-
Dear Sir I created New Package by wizard in SQL server 2000. I want to write store procedure to execute it but i don't know how to write it. could you tell me how to write it?
very Simple --Query without parameter create proc procedure_name as Select * from table_name --conditional query create proc procedure_name as begin Select * from table_name End Rakesh Jha