视图上未编译的存储过程和DML操作 [英] Uncompiled Stored procedure and DML operation on view

查看:87
本文介绍了视图上未编译的存储过程和DML操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,我是编程的初学者.我有些疑问

1)我们可以创建一个未编译的存储过程吗?
2)我们可以不使用存储过程来创建编译查询吗?
3)可以进行DML操作吗?

PLZ help

hi friends ,I m a beginner in Programming.I have some doubt

1)can we create a stored procedure which is not compiled?
2)can we create compiled queries with out using stored procedure?
3)DML operation is possible in view?

PLZ help

推荐答案

1)否
2)通过用户定义的函数.....但是,大多数情况下,我们将存储过程视为函数,因为udf表示单个项目.well存储过程表示组或可以是单个.

3)是的,我对此了解不多,我很确定我们可以更新view(dml操作)
1)no
2)ya through user defined functions .....but most of the time we perfer store procedure not the function because udf acts for single item.well store procedure acts for group or can be single.

3)ya i not know much about it much i''m pretty sure we can update view(dml opertion)


存储过程在第一次运行时会编译,
然后,它将缓存用于下一次运行.如果您想在每次调用时进行编译,我们可以使用WITH RECOMPILE选项.由于执行计划总是创建的,因此这会降低性能.

对于DML上的视图有一些限制,请检查
http://msdn.microsoft.com/en-us/library/ms187956.aspx [ ^ ]
Storedprocedure is compiled when it is run for the first time,
Then it is uses the cache for the next run. If you want to compile it on each call we could give WITH RECOMPILE option. This is will reduce the performance since the excution plan is created always.

For DML on views there are some restrictions please check
http://msdn.microsoft.com/en-us/library/ms187956.aspx[^]


这篇关于视图上未编译的存储过程和DML操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆