开发者

Trigger on Select

开发者 https://www.devze.com 2023-01-21 06:00 出处:网络
I want to return different results to user when using Select because it returns wrong value and i cant use view or something else because its third party app开发者_JS百科liction.

I want to return different results to user when using Select because it returns wrong value and i cant use view or something else because its third party app开发者_JS百科liction.

I want to make instead of his select perform another select trigger or any thing else.


SQL Server doesn't have the concept of a INSTEAD OF SELECT (nor an AFTER SELECT) trigger - you will need to find another way to achieve this.


Actually SQl server Supports Trigger on an INSERT, UPDATE, or DELETE statement, there is no concept of trigger on Select statement. You can write stored procedure to implement you logic or you have to find some other way.


Check out my proposed solution in this similar question.

"Use a VIEW and INSTEAD OF triggers to make it behave as a table and you can accomplish the equivalent of an INSTEAD OF SELECT trigger among other interesting things...."

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号