Home » SQL & PL/SQL » SQL & PL/SQL » Commands in SQl
Commands in SQl [message #680738] Fri, 05 June 2020 03:08 Go to next message
aartiyadav
Messages: 1
Registered: June 2020
Junior Member
Hello Everyone, I am in this community and I am in learning face for SQL, I want to know some DCL command syntax for GRANT and REVOKE. Can anyone suggest me some reference where I can check and do the practice of this command?
Re: Commands in SQl [message #680741 is a reply to message #680738] Fri, 05 June 2020 04:25 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Welcome to the forum.
Please read the OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.

Also always post your Oracle version, with 4 decimals (query v$version), as often solution depends on it.

Documentation is there, choose your version then click on Development and scroll down to SQL Reference.

[Updated on: Fri, 05 June 2020 04:26]

Report message to a moderator

Re: Commands in SQl [message #681027 is a reply to message #680738] Mon, 08 June 2020 07:46 Go to previous messageGo to next message
singhjjyoti0399
Messages: 1
Registered: June 2020
Junior Member
Here is the syntax for both of the DCL Commands

1. GRANT Command

GRANT privilege_name
ON object_name
TO {user_name |PUBLIC |role_name}
[WITH GRANT OPTION];

2. Revoke Command

REVOKE privilege_name
ON object_name
FROM {user_name |PUBLIC |role_name}

Re: Commands in SQl [message #681028 is a reply to message #680741] Mon, 08 June 2020 07:53 Go to previous messageGo to next message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
You can also download and install on a windows machine their free version of the database that is designed to play nice on a standard windows 10 or linux workstation. see the following link. Its the full database and available for use in training or production but it is limited to one processor and a total of 4 gigs of table storage in the database

https://www.oracle.com/database/technologies/xe-downloads.html

[Updated on: Mon, 08 June 2020 07:53]

Report message to a moderator

Re: Commands in SQl [message #681029 is a reply to message #681027] Mon, 08 June 2020 09:57 Go to previous message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
singhjjyoti0399 wrote on Mon, 08 June 2020 14:46
Here is the syntax for both of the DCL Commands

1. GRANT Command

GRANT privilege_name
ON object_name
TO {user_name |PUBLIC |role_name}
[WITH GRANT OPTION];

2. Revoke Command

REVOKE privilege_name
ON object_name
FROM {user_name |PUBLIC |role_name}

This is a very specific case for these statements.
Have a look at the documentation for the complete syntax and features of these commands.

[Updated on: Mon, 08 June 2020 09:57]

Report message to a moderator

Previous Topic: FORALL with associative array and INDEX BY VARCHAR
Next Topic: CASE Statement on a Cursor
Goto Forum:
  


Current Time: Thu Mar 28 08:52:04 CDT 2024