Sohail Hasan <[EMAIL PROTECTED]> wrote:I tried to GRANT only SELECT rights by using the below mentioned syntax but it is giving error:
I have created a database and created a user with select rights to that database, there is a table name xyz in that database that I don't want that user to view, that's why i want to revoke that select rights from only that table, can anyone tell me what syntax of revoke would be used here.
You can't revoke SELECT privilege from the table if you grant privileges on the database. You can grant SELECT privilege on each table that you want to be visible to user instead.
GRANT SELECT ON product cmstemp.* TO autobot1 IDENTIFIED BY 'autobot1';
Where product is the tablename and cmstemp is the DB name.
shasan