Stored Procedures Vs. Views

前端 未结 7 1436
难免孤独
难免孤独 2020-12-07 16:26

I have used both but what I am not clear is when I should prefer one over the other. I mean I know stored procedure can take in parameters...but really we can still perform

7条回答
  •  失恋的感觉
    2020-12-07 16:47

    I correlate the use of stored procedures to the need for sending/receiving transactions to and from the database. That is, whenever I need to send data to my database, I use a stored procedure. The same is true when I want to update data or query the database for information to be used in my application.

    Database views are great to use when you want to provide a subset of fields from a given table, allow your MS Access users to view the data without risk of modifying it and to ensure your reports are going to generate the anticpated results.

提交回复
热议问题