Can we pass parameters to a view in SQL?

前端 未结 20 2369
庸人自扰
庸人自扰 2020-11-29 18:29

Can we pass a parameter to a view in Microsoft SQL Server?

I tried to create view in the following way, but it doesn\'t work:

create o         


        
20条回答
  •  悲哀的现实
    2020-11-29 18:49

    No, a view is queried no differently to SELECTing from a table.

    To do what you want, use a table-valued user-defined function with one or more parameters

提交回复
热议问题