• I don't know of a way to find what is only SQL Server 2008 compatible, but you can download and run the SQL Server Upgrade Advisor to make sure you can upgrade 2000 and 2005 databases without issue.

    You also should look at the What's New list which will help you see what is current version only.'

    In your example the script is 2008 only compatible because you are assigning a value to a local value when you declare it:

    declare @Date DateTime = GetDate()

    To be pre-2008 compatible you would need to change that to:

    declare @Date DATETIME

    SET @date = GetDate()