Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7961185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:57:58+00:00 2026-06-04T04:57:58+00:00

I’m creating a database with oracle and php for an assignment and i have

  • 0

I’m creating a database with oracle and php for an assignment and i have to show the use of roles. i created a new role called employee and assigned it to a new user called employee1

CREATE ROLE read_only;
GRANT create session TO read_only;
GRANT select ON workson TO read_only;
GRANT select ON employee TO read_only;
GRANT select ON project TO read_only;
GRANT select ON department TO read_only;

CREATE ROLE employee;
GRANT read_only TO employee;
GRANT update ON employee TO employee;
GRANT insert ON workson TO employee;

Create user employee1 identified by qwerty1;
GRANT employee TO employee1;

Why does using any selects when connected as employee1 say there is no such table. select * from employee says there is no table. Did i form my roles wrong or something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:58:00+00:00Added an answer on June 4, 2026 at 4:58 am

    Your grants appear to be fine. Assuming that the employee1 user does not own the employee table, you would need to qualify the table name in your SELECT with the owner of the table. For example, if we’re talking about the employee table that is owned by the hr user, you’d need to

    SELECT *
      FROM hr.employee;
    

    If you don’t want to have to qualify your table names, you have a couple of options. First, you can create synonyms. You can create a private synonym in the employee1 schema that applies only to the employee1 user

    CREATE SYNONYM employee
       FOR hr.employee;
    

    or you can create a public synonym that applies to all users

    CREATE PUBLIC SYNONYM employee
       FOR hr.employee;
    

    The second option would be to set your current_schema after connecting.

    ALTER SESSION SET current_schema=hr;
    

    If you have an appropriate synonym in place or if you’ve set the current_schema, you don’t have to prefix the table name with the owner of the table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I have a reasonable size flat file database of text documents mostly saved in
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.