2

I've seen something like this in SQL Server (running this query against the master database):

select * from tempdb..sysobjects

which seems to return exactly the same results as:

select * from tempdb.sys.objects

I've seen that the double dot can be used as a way to omit the schema name but I don't see anything omitted here, going by that logic then tempdb..objects would be valid which is not).

Community
  • 1
  • 1
daremkd
  • 8,244
  • 6
  • 40
  • 66

1 Answers1

3

tempdb..objects will be interpretted as tempdb.dbo.objects

Both are two different system views

sys.objects

Contains a row for each user-defined, schema-scoped object that is created within a database, including natively compiled scalar user-defined function.

sys.sysobjects

Contains one row for each object that is created within a database, such as a constraint, default, log, rule, and stored procedure

Note : This SQL Server 2000 system table is included as a view for backward compatibility. We recommend that you use the current SQL Server system views instead. To find the equivalent system view or views, see Mapping System Tables to System Views (Transact-SQL). This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

Pரதீப்
  • 91,748
  • 19
  • 131
  • 172