tags:

views:

13

answers:

1

Is there a way I can detect when was a stored procedure created/modified, so I can get a list of what has been altered in the last 2 weeks?

+2  A: 

Check information_schema.routines in mysql.

ROUTINE_NAME is column name

CREATED is created date

LAST_ALTERED is modified date

select ROUTINE_NAME
from information_schema.routines
where DATEDIFF(CURDATE(),created) < 14
Sachin Shanbhag
There is no sys.objects table in MySQL.
Pentium10
@Pentium10 - Please check my edited answer. That older query was for sql server.
Sachin Shanbhag
Please update your answer with the correct query to get only stored procedures modified in last 2 weeks.
Pentium10
@Pentiun10 - I do not have mysql on my system. So check if the updated query helps you.
Sachin Shanbhag