Solved

what is .. in sql

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

What is ".." in SQL?

Thanks,
Wayne
0
Comment
Question by:thewayne73
7 Comments
 
LVL 142

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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 142

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 142

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now