Compare the database compatibility_level to the server version?
I found a couple of options that I think will work:

First, you could multiply the first two digits of SERVERPROPERTY('productversion') by 10:

SELECT name, compatibility_level
FROM master.sys.databases
WHERE compatibility_level &lt;&gt;
    10 * convert(int,CONVERT(char(2),SERVERPROPERTY('productversion')))


Or, probably easier, you could just compare to the highest compatibility_level on the server:

SELECT name, compatibility_level
FROM master.sys.databases
WHERE compatibility_level &lt; (SELECT max(compatibility_level) FROM sys.databases)


FYI, you can't just compare to the compatibility_level of MASTER or MODEL, as those can be left lower after an upgrade, or deliberately changed. TempDB, however, I think is always the current version.