Using 2005, I received the following message.
SELECT SCHEMA_NAME(schema_id), name FROM sys.objects
WHERE name = 'Table1'
Msg 195, Level 15, State 10, Line 1
'SCHEMA_NAME' is not a recognized function name.
Originally, I had expected an invalid object message ( sys.objects ), and that' just what I got when I tried.
SELECT
name FROM sys.objects
WHERE
name = 'Table1'
Msg 208, Level 16, State 1, Line 1
Invalid object name 'sys.objects'.