Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the '..' in 'SELECT * FROM database..table' mean?

Tags:

sql

sql-server

I understand than in a SQL statement, that the xxx portion of, say, xxx.TableName references the schema of the data table. Typically, most tables are created as dbo.TableName. When referencing a table in SQL code, the default schema can be left out and you can just reference the table by the table name. Likewise, if you need to reference a table within another database, you can reference it by the following syntax Database.dbo.TableName.

However, I just ran into another users code which has Database..TableName. What does the .. represent? I can assume a reasonable answer but I can't find any concrete documentation. (Google doesn't seem to work well with the double-dot text.)

like image 590
RLH Avatar asked Mar 18 '23 03:03

RLH


1 Answers

It is short hand to use the default schema.

select x from steve..mark is logical equivlant as select x from steve.dbo.mark as long as dbo is the default schema

three part naming convention for sql server

msdn FROM CLAUSE

like image 132
gh9 Avatar answered Mar 21 '23 07:03

gh9