I need to do stored procedure for my project but I have no idea on starting it. Please help.
Thanks.
I need to do stored procedure for my project but I have no idea on starting it. Please help.
Thanks.
Start by learning some basic SQL. You can do this by reading some basic articles in SQL Server Books On Line or on may web sites (SQLTeam.com, SQLServerCentral, SSWUG.org, etc, etc) then creating simple queries in your database or in one of the sample databases (download from microsoft.com) and looking at the SQL view.
Then to create a stored proc, if your using SQL Server 2005, open the Programmability folder, right-click on Stored Procedures and click New Stored Procedure. It will start by creating a stored proc from a template and you can go from there.
I found that it was best to look at a lot of samples, execute them and make a few changes to them before embarking on creating my own stored procs.
Good luck! Tony
I'll point you to Aaron Bertrand's blog entry on best practices on stored procs. I think it'll be a good read for you.
No one has followed this question yet.