[thelist] create synonym

rudy r937 at interlog.com
Wed Dec 6 21:16:41 CST 2000


> In Oracle, a public or private synonym is often used to eliminate
> the need to specify a username when requesting a table in another
> schema. SQL Server does not provide public or private synonyms.

hi david

tommy chong voice:  bummer, man

(aside: just caught a few moments the other night of some sitcom with an
old hippie in a fotomat i could swear is tommy chong, one of my personal
alltime favourite heroes)

anyhow, if the purpose of the synonym is to make some other user's table
more easily addressible, perhaps a view might do the same job?

   create view myview
    as select * from otheruser.histable

of course, you should be aware that "select star is bad" (url upon request)
and you might also want to give the view columns your own names...

  create view myview (myfoo, mybar, ...)
    as select hisfoo, hisbar, ...
      from otheruser.histable

this assumes i've got the syntax right for referring to the other table in
the other schema (the reason i'm not sure is because i don't do that every
day, preferring to access my own tables predominantly)

what did your informix dba say you should use the synonym for, anyhow?


rudy.ca





More information about the thelist mailing list