Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I create a new role in my database with my first name which is Denise, and add read only access on the HR user's EMPLOYEES table to this role.

share|improve this question
What DBMS are you working with (SQL Server, MySQL, Oracle)? It differes just a bit depending on which DBMS you are referring to. Are you looking for T-SQL code or do it through a GUI or management tools? – Shawn Melton Jul 23 '11 at 3:08
Wouldn't the t-sql tag indicate the DBMS? – Quick Joe Smith Jul 23 '11 at 4:56
Well the OP tagged it with clustered-index, which has really nothing to do with the question. I would assume SQL Server is the DBMS but other DBMS questions show up on this site so I just put t-sql for now. – Shawn Melton Jul 23 '11 at 5:44

Using Adventureworks database as a reference, following shows sudo code

USE [AdventureWorks] 
USE [AdventureWorks]  
GRANT SELECT ON [HumanResources].[Employee] TO [Denise]
share|improve this answer

From the documentation on MSDN for Create Role and Grant select

create role denise identified by appropriateVariable;

grant select on HR.employees to denise;
share|improve this answer
I'm torn here. I want to welcome another dba to the fold, but this answer is ... less than helpful. I've rewritten it a bit to show you no hard feelings. Welcome to the site, but can we try and put a tad more effort into the posts? :) – jcolebrand Jul 23 '11 at 3:50
This syntax isn't SQL Server... – gbn Oct 8 '11 at 9:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.