Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to grant permission?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 16-12-2009
Member
 
Join Date: Nov 2009
Posts: 1,119
How to grant permission?
  

Hi All,

I ma developing project in the SQL. For this project I need to grant permission for different user with different access rights . I don't know the procedure to grant the permission in the SQL.
Please let me aware about the How to grant permission? I would greatly appreciate your any help over this.

Reply With Quote
  #2  
Old 16-12-2009
Member
 
Join Date: Apr 2008
Posts: 1,944
Re: How to grant permission?

Hi Friend,

In the SQl you can achieve the granting by using the "GRANT" command. The syntax for the "GRANT" command is as below:
Quote:
GRANT <permissions which you want apply>
[ON <name of the table over you want to apply permission>]
Example:
Quote:
GRANT <READ>
[ON <EMP>]
Reply With Quote
  #3  
Old 16-12-2009
Member
 
Join Date: May 2008
Posts: 2,001
Re: How to grant permission?

Hello,

Please refer below syntax for the granting any permission in the SQL:
Quote:
GRANT
{
ALL [PRIVILEGEStype] | permission}
{
[(columnName)] ON {tableName | viewName}
| ON {tableName | viewName}[(columnName)]
| ON {stored_procedureName | extended_procedureName}
}
TO securityAccountName
[WITH GRANT OPTION]
[AS {groupName}]
Reply With Quote
  #4  
Old 16-12-2009
Member
 
Join Date: Apr 2008
Posts: 1,993
Re: How to grant permission?

If you want to gran the permission over the SQL statement. You can grant permission for following statement:
  1. BACKUP DATABASE statement
  2. CREATE TABLE statement
  3. CREATE DATABASE statement
  4. CREATE DEFAULT statement
  5. CREATE RULE statement
  6. CREATE VIEW statement
  7. BACKUP LOG statement
  8. CREATE PROCEDURE statement
Reply With Quote
  #5  
Old 16-12-2009
Member
 
Join Date: May 2008
Posts: 2,283
Re: How to grant permission?

Hi friend,
The below SQL example will demonstrate yow procedure to grant permission in SQL:
Quote:
GRANT insert

ON account

TO public

GO


GRANT delete, insert

ON account

TO adam, lana

GO
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to grant permission?"
Thread Thread Starter Forum Replies Last Post
Fixed: The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID Jolie-Pitt Windows x64 Edition 3 07-01-2014 08:48 AM
The Sims 3 Showtime: Genie won't Grant wishes Raj@LOL Video Games 7 15-03-2012 11:20 PM
Windows 7 error: "You need permission to perform this action. You require permission from PCNAME-PC\USERNAME to make changes to this file." Nuryn Operating Systems 3 20-03-2011 05:40 AM
Syntax for GRANT and REVOKE in MySQL MacKenze Software Development 4 09-12-2010 03:38 AM
I can't grant terminal access to users in GPO troy Active Directory 3 05-04-2007 09:24 PM


All times are GMT +5.5. The time now is 03:07 AM.