Can we pass parameters to a view in SQL?

前端 未结 20 2362
庸人自扰
庸人自扰 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:57

    You can bypass just to run the view, SQL will wine and cry but just do this and run it! You can't save.

    create or replace view v_emp(eno number) as select * from emp where (emp_id = @Parameter1);
    

提交回复
热议问题