如何在SQL Server中获取存储过程或函数中最后“N”次修改的日期 [英] How to get the dates of last 'N' number of modifications in stored procedure or function in SQL server

查看:55
本文介绍了如何在SQL Server中获取存储过程或函数中最后“N”次修改的日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们知道可以从SQL Server中找到存储过程的最后修改日期。



但是可以在存储过程或函数中获取最后'N'次修改的日期。

解决方案

如果没有版本控制,那么您必须维护自己的历史记录表。您可以在更改表之前创建表并编写sp版本。查看DDL触发器。


是的,但仅当你的代码在版本控制系统下时。



检查这个



sql-development / sql -source-control / [ ^ ]



sql-version-control-methods [ ^ ]

As we know it is possible to find the last modified date of an Stored Procedure from an SQL Server.

But is it possible to get the dates of last 'N' number of modifications in an stored procedure or function .

解决方案

If there is no version control, then you have to maintain your own history table. You can create the table and write the sp version before changing it. Look up about DDL triggers.


Yes, But only when your codes are under version control system.

check this

sql-development/sql-source-control/[^]

sql-version-control-methodology[^]


这篇关于如何在SQL Server中获取存储过程或函数中最后“N”次修改的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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