I have Ran below query
DECLARE @temp TABLE(Id int identity(1,1), name varchar(20))
INSERT INTO @temp (name)
select name from sys.tables
The above query is working fine with out any issues in one machine. But i ran the another machine it through some error. Its very wired for me. I have attached the screen shot.
Both machines are having same sql server SQL server 2008 R2 Express(Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86) Apr 2 2010 15:53:02 Copyright (c) Microsoft Corporation Express Edition with Advanced Services on Windows NT 5.1 (Build 2600: Service Pack 3) ) Edition.