0

Need to fetch all column names of particular table having specific permission. I am trying this:

SELECT column_name
  FROM information_schema.columns
 WHERE table_name = 'persons'

I want column names having viewer permissions in person table. Above SQL listing all field name. Need to add one more condition here that will list field name which is restricted to perticular group

pyrocumulus
  • 9,072
  • 2
  • 43
  • 53
Shrenik
  • 33
  • 8
  • VIEWER permissions means – Sathish Oct 21 '14 at 09:22
  • how you find which columns are under in VIEWER? – Sathish Oct 21 '14 at 09:28
  • Need to write SQL that will return all field names of particular table which are accessed to VIEWER group only. – Shrenik Oct 21 '14 at 09:35
  • It would be easier to understand what you want if you showed the CREATE TABLE and GRANT statements, and then showed the resulting output you want from the query. Right now it's hard for me to tell quite what you want. Do you want to know which columns of table `persons` the group `viewer` has `SELECT` rights for? – Craig Ringer Oct 21 '14 at 23:09

0 Answers0