强制重编译

 

option (recompile)
使用在语句
select * from Student where id =1 option (recompile)

  

使用在存储过程

 create proc proc_test  (@i int) with recompile
as    
    
    
select * from Student where id = @i  

  

posted @ 2022-07-23 08:56  二维一加零  阅读(26)  评论(0)    收藏  举报