I have been asked this question in the technical interview.
what is the difference between output of stored procedure and a function?
Can anybody please explain this?
I have been asked this question in the technical interview.
what is the difference between output of stored procedure and a function?
Can anybody please explain this?
A user defined function can return a strongly defined scalar or a tabular value. Basically, a function can return any data type you can assign to a T-SQL variable or a rowset.
A stored procedure does not strongly define its return type. It can have zero, one or multiple result sets which can be of scalar or rowset values.