Functions vs Stored Procedures

后端 未结 12 609
我寻月下人不归
我寻月下人不归 2020-12-02 06:26

Let\'s say I have to implement a piece of T-SQL code that must return a table as result. I can implement a table-valued function or else a stored procedure that returns a se

12条回答
  •  执笔经年
    2020-12-02 06:48

    If you have a function you could use it as a part of your SQL statement, for example

    SELECT function_name(field1) FROM table
    

    It does not work this way for the stored procedures.

提交回复
热议问题