Solved

what is .. in sql

Posted on 2008-10-29
7
202 Views
Last Modified: 2012-05-05
Hello Experts,

What is ".." in SQL?

Thanks,
Wayne
0
Comment
Question by:thewayne73
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22831116
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
 
LVL 60

Accepted Solution

by:
chapmandew earned 500 total points
ID: 22831117
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
 
LVL 16

Expert Comment

by:brad2575
ID: 22831118
you need to be more specific.

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

0
Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

 
LVL 60

Expert Comment

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

SELECT * FROM linked_server...table
0
 

Author Closing Comment

by:thewayne73
ID: 31511172
Perfect explaination.  Thanks.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22831249
>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
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22831264
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question