Hi everybody,
I've created the simplest SP to return one record back based on the RegistrationID
select *, one extra field from myTable where ID = @ID
However, I have questions:
1. Does it make sense to add a check for the existance of the ID (what if somebody deletes this record while it was being requisted)? Good point, BTW, I need to add a flag Deleted = 0 to my select.
2. Depending on PersonType I need to return only certain fields. Does it make sense to branch this SP to list only required fields (but then we would need to modify this SP often in case fields changed/added)
What do you think here?
Thanks in advance.
If it's not broken, fix it until it is.
My Blog