0

In some queries I noticed that selection of a table looks like

select *
from ..TableName

And this table has dbo scheme.

So, is this the same thing as

select *
from dbo.TableName

and I can use .. just for comfort? What does .. mean? Is it only acronym for dbo or I can use it somewhere else?

Potato
  • 397
  • 4
  • 16
  • instead of `databasename.schemaname.tablename`, .. is used – Vikrant Feb 10 '17 at 10:23
  • thanks a lot, sorry for duplicate, I couldn't find similar question – Potato Feb 10 '17 at 10:32
  • I've seen the schema omitted quite frequently when referencing another database. e.g. `master..spt_values` - I didn't realise that you could do `..` and even `...` until now but there doesn't seem any point as just omitting the dots would have the same effect. – Martin Smith Feb 10 '17 at 12:49

1 Answers1

2
  • first . is for current database name
  • second . is for default schema (dbo)

In Sql server, complete name of an object is made up of four identifiers:

server_name.[database_name].[schema_name].object_name

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