Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Store Procedure

Author  Topic 

tooba
Posting Yak Master

224 Posts

Posted - 2010-06-16 : 18:09:24
Hi,
In general i know why we use store procedure.Can anybody give best example where we can use store procedure in T-SQL programming or please explain me how i can achieve this task.

"SP that links directly to a web page and populates a table with the fields in the webpage."

Thanks in advance.

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2010-06-16 : 23:46:40
[code]
Create proc Populate_MyTable_Procedure
@FirstName varchar(20)
,@LastName varchar(30)
as

Insert into MyTableName(FirstName,LastName)
select @FirstName,LastName
go
[/code]

Then to use the procedure you would code your website to connect to your database and run the procedure


Populate_MyTable_Procedure

and you would add parameters for @FirstName, and @Lastname. Unfortuantly I do not believe there is a Universal "Best Example" if you do not provide more details. Based off what you asked it's hard to see exactly what you want to accomplish. Hopfully this helps


Success is 10% Intelligence, 70% Determination, and 22% Stupidity.
\_/ _/ _/\_/ _/\_/ _/ _/- 881
Go to Top of Page

tooba
Posting Yak Master

224 Posts

Posted - 2010-06-18 : 01:04:55
Thanks for your reply. Is there any web site I can find out sample store procedure?
Go to Top of Page
   

- Advertisement -