General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Jean-Rene:
I wrap everything up in a transaction and if something fails, I roll it back.
If you want to limit your result sets, you send a parameter to the stored procedure, like a primary key for example. Same goes for updates and deletes. For inserts, I don't send any parameters.
Here is a simple example of a SQL Server stored procedure that receives as a parameter a primay key that identifies the record to be retrieved:
CREATE procedure spGetXrefs
@caseid int
as
select * from Xrefs
where fk_cases = @caseid
Charlie
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only