Reply to Re: linking tables from other databases?

Your name:

Reply:


Posted by dmarkle on 01/18/07 13:44

Or, in SQL Server 2005, you can use a SYNONYM to accomplish the same
thing, which IMO is a bit more elegant. Check out the CREATE SYNONYM
docs...

http://msdn2.microsoft.com/en-us/ms177544.aspx

-Dave


AlterEgo wrote:
> misscrf,
>
> You can use a view to reference a table in another database as follows:
>
> create view MyView as
> select Column1, Column2 ...
> from MyOtherDatabase.dbo.MyTable
>
> --or to inherit the schema (owner) use:
>
> from MyOtherDatabase..MyTable
>
> Grant only read privledges on this view.
>
> - Bill
>
> "misscrf" <misscrf@yahoo.com> wrote in message
> news:1169071836.030055.205600@a75g2000cwd.googlegroups.com...
> > In a database, I am creating a new db. From there, I am setting up the
> > tables, so that I can eventually create a front end (usually access,
> > but I may attempt to be brave and lose the shell.) Anyway, I want to
> > use a table, read-only for a lookup. It exists in another database on
> > our system. Is there a way for me to link it into this database that I
> > am working on? I would think of it like in access when you go to do a
> > new table and you choose to link the table from somewhere else. That
> > is what I want to do. Can anyone possibly step me through this?
> > I know basics of sql server and like to learn.
> >
> > Thanks!
> >

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация