prashant_victory


Hi,
I have seen many examples at MSDN library related to SQL Querries in all queries one thing is same the way they use tables in there queries. BUT wht is this really i am not getting this, can anyone tell me.. the code and the problem is as follows:

Code Snippet

FROM Purchasing.ProductVendor JOIN Purchasing.Vendor
ON (ProductVendor.VendorID = Vendor.VendorID)

In the above code u see "Purchasing.ProductVendor", I want to ask that wht is this
Purchasing Stands for, If we suppose that purxchasing is the database name then also
normally we use database name as Purchasing.dbo.ProductVendor BUT I am not getting that
what is this,
Please if someone knows then explain it to me,
Thanks.





Re: Strange thing in All examples at MSDN

Konstantin Kosinsky


Full name of object in SQL Server is ServerName.DatabaseName.SchemaName.ObjectName.


In MSDN samples Purchasing is a schema name. Also, you could use AdventureWorks.Purchasing.ProductVendor and AdventureWorks is a database name.

You could download last version of samples database here - http://www.codeplex.com/MSFTDBProdSamples






Re: Strange thing in All examples at MSDN

Vijay Ram S

Hi Prashant

Purchasing is the schema in Advenuture Works sample database. dbo is the default schema. We can create our own schema using CREATE SCHEMA statement.

If you have MSDN just search for schemas.

-Vijay