Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2005
    Posts
    53

    Unanswered: create alias for schema owner

    Hi all,

    how can i create alias for schema owner so I don't have to type owner.tablensmes

    I just want to do
    select * from tablename

    instead of select * from owner.tablename.

    help!!

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    use SYNONYM
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Just run
    Code:
    ALTER SESSION SET CURRENT_SCHEMA owner;
    that will change the "context" to the other schema, and you can omit the table owner.

    Or log into Oracle as that user, then you don't need to type the owner as well.

  4. #4
    Join Date
    Oct 2004
    Posts
    4
    Hi,

    You can create synonym for same as follows.

    create public synonym emp for scott;

    Now you can use following command as different user
    select * from emp;

    instead of select * from scott.emp;

    ALL the best,
    Gitesh Trivedi
    Welcome - DBAMETRIX Solutions

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •