I am well aware of SQL statements such as select, insert, update and delete. However I am new to stored procedures.
I am using SQL Management Studio Express.
Any code example? For example, Registration, a stored procedure that saves the customer data in the database.
The best thing about using stored procedures in preference to embedded SQL is that, done properly, they present a versionable interface to the database that is independent of the client code. It gets the SQL out of the client codebase, which means that so long as the external interface doesn’t change: parameters, results sets, etc., the DBAs are free to tune queries or even completely remodel the database schema without requiring changes to the client software.
It also hugely simplifies security. Clients don’t require permission grants to the underlying tables themselves. All they need is
grant executeon the stored procedures.If all you do is write a stored procedures that wrap simple insert/update/delete statements, you’re not really accomplishing much. The stored procedures should represent more logical operations.
Remember, any real database will long outlive the software used to access it. Data is forever; software is transient.