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
 General SQL Server Forums
 New to SQL Server Programming
 Stored procedure Vs SQL statement

Author  Topic 

AaronOIl2008
Starting Member

1 Post

Posted - 2008-01-09 : 11:48:08
Hi Firends - What is good to use if we have to retrive records from SQL database. Should I use Stored procedures or should I write SQL statemnt in my Code.

Please let me know the advantages and disadvantages of both

Thanks in advance

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-01-09 : 11:50:24
If you consider ease of maintainence, then stored procedure is better as any further changes can be dealt with by simply changing stored procedure rather than touching your application code.
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-01-09 : 12:08:43
also procs are better from a security/permissions point of view. you can deny access to all tables and put the permissions on the procs.


elsasoft.org
Go to Top of Page
   

- Advertisement -