Reputation: 11697
I have recently started working on Databases. I know the basic difference between Stored Procedures and Prepared Statements. But can just brief me an idea that when we have to use which one. My trainer told me both are used when you have to execute a command often but then which one we should go for. I have heard that Stored procedures are always preferred. I know Stored procedures are pre-compiled and written in database. I can accept if someone says actually there is no similarity between the two so no question of differences and usage preference, but still I putted this question as I am unaware of these things. I am using SQL Server 2008 Express with C#. Can some one help me out please.
Upvotes: 1
Views: 284
Reputation: 432431
Use both? Stored procedures for writes, prepared statements for reads?
Why?
Oherwise, there is no correct answer because it will be different depending who you ask
Upvotes: 3