mckenzie Posted May 17, 2006 Share Posted May 17, 2006 hello there, Iam trying to grant a newly created user, access to 3 tables called STUDENT, INSTRUCTOR and UNIVERSITY but be restricted to only those students/instructors who have links with UK universities. Any ideas? I'm new to SQL so will have a stab at it: grant select * from student, instuctor, university where country = 'uk' Link to comment Share on other sites More sharing options...
Jack McKalling Posted May 17, 2006 Share Posted May 17, 2006 The syntax of the GRANT query, is this: GRANT rights (columns) ON tablename TO accountname@hostname IDENTIFIED BY 'password'So in your case it might be like this:GRANT select ON student, instuctor, university TO accountname@hostname IDENTIFIED BY 'password'To grant permission to only UK universities, which can't in a GRANT query, should be validated by each action the account does I think :)This query should help you for now anyway Link to comment Share on other sites More sharing options...
mckenzie Posted June 6, 2006 Author Share Posted June 6, 2006 The address of the university is formatted as address_type e.g. streetcitycountrywould the syntax recommended be appropriate still?The uni ID is a foreign key in both the student and lecture tables (if you need to know that) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now