July 30, 2008 at 6:48 am
Which is good to use in which case & why?
SQL Query or Stored Procedures
for example
I want to do operation like insert/update/delete/Select
Both way I can do it.
Which is good? and Why?
July 30, 2008 at 7:15 am
July 30, 2008 at 7:54 am
There's really not a difference between a query and a procedure. A procedure is just a query stored in the database. Queries can be parameterized just like queries. In fact, that's one of the best ways to do dynamic queries (building the query through code instead of storing it in a procedure).
I wouldn't say that a dynamic query is better than a stored procedure or vice versa. I think both have their place and you need to be flexible enough to acknowlegde where one works better than the other. Going all one way or all the other is foolish.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
July 30, 2008 at 8:22 am
Read Steve's editorial from today.
July 30, 2008 at 8:24 am
Scott White's editorial, actually.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply