[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

what is .. in sql

Hello Experts,

What is ".." in SQL?

Thanks,
Wayne
0
thewayne73
Asked:
thewayne73
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you refer to 4-part-notation

see some variations on how to specify the table you want to query, specifying the table owner, database, linked server name, all optional.

SELECT * FROM table
SELECT * FROM table_owner.table
SELECT * FROM database.table_owner.table
SELECT * FROM database..table
SELECT * FROM linked_server.database.table_owner.table
SELECT * FROM linked_server.database..table
SELECT * FROM linked_server...table

Open in new window

0
 
chapmandewCommented:
it is use to omit the schema name of an object...so, this:

select * from databasename.schemaname.tablename

can be written (if the schemaname is dbo) as

select * from databasename..tablename

you're just leaving out the schema name
0
 
brad2575Commented:
you need to be more specific.

Where at are you referring to this?  In a query?  In a table name path definition?

0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
chapmandewCommented:
angelIII, can you do this? (ive never tried it, but it doesn't make sense that you can)

SELECT * FROM linked_server...table
0
 
thewayne73Author Commented:
Perfect explaination.  Thanks.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>angelIII, can you do this? (ive never tried it, but it doesn't make sense that you can)
>SELECT * FROM linked_server...table

yes. the default database of the login used will be "used" implicitly
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
also, some "linked server" (like oracle) do not have the "concept" of "instance/database", but just database, so that part of "database" must be left empty.
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now