revoke and Grant command
صفحة 1 من اصل 1
revoke and Grant command
SQL GRANT Command
SQL GRANT is a command used to provide access or privileges on the database objects to the users.
The Syntax for the GRANT command is:
GRANT privilege_name
ON object_name
TO {user_name |PUBLIC |role_name}
[WITH GRANT OPTION];
- privilege_name is the access right or privilege granted to the user. Some of the access rights are ALL, EXECUTE, and SELECT.
- object_name is the name of an database object like TABLE, VIEW, STORED PROC and SEQUENCE.
- user_name is the name of the user to whom an access right is being granted.
- user_name is the name of the user to whom an access right is being granted.
- PUBLIC is used to grant access rights to all users.
- ROLES are a set of privileges grouped together.
- WITH GRANT OPTION - allows a user to grant access rights to other users.
For Eample: GRANT SELECT ON employee TO user1;This command grants a SELECT permission on employee table to user1.You should use the WITH GRANT option carefully because for example if you GRANT SELECT privilege on employee table to user1 using the WITH GRANT option, then user1 can GRANT SELECT privilege on employee table to another user, such as user2 etc. Later, if you REVOKE the SELECT privilege on employee from user1, still user2 will have SELECT privilege on employee table.
SQL REVOKE Command:
The REVOKE command removes user access rights or privileges to the database objects.
The Syntax for the REVOKE command is:
REVOKE privilege_name
ON object_name
FROM {user_name |PUBLIC |role_name}
For Eample: REVOKE SELECT ON employee FROM user1;This commmand will REVOKE a SELECT privilege on employee table from user1.When you REVOKE SELECT privilege on a table from a user, the user will not be able to SELECT data from that table anymore. However, if the user has received SELECT privileges on that table from more than one users, he/she can SELECT from that table until everyone who granted the permission revokes it. You cannot REVOKE privileges if they were not initially granted by you.
صفحة 1 من اصل 1
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى
الأربعاء فبراير 25, 2015 3:16 pm من طرف فطوط نونو
» مضاد فيرس مجاني من ميكروسوفت New Antivirus From Microsoft - Free
السبت مايو 10, 2014 3:24 am من طرف ابراهيم الشيخ1
» كيفية تثبيت Windows XP بعد تثبيت Windows7
السبت أبريل 12, 2014 5:49 pm من طرف tareqsat
» النسخة الاصلية لكتاب الف ليلة وليلة الممنوع ( للكبار فقط )
الخميس مارس 13, 2014 12:44 am من طرف blawtn.Heart
» http://ahlakalam.to-relax.net/t476-topic
الثلاثاء مارس 04, 2014 1:12 am من طرف myemam
» كتاب نادر - اعترافات جولدامائير واسرار لم تنشر عن حرب اكتوبر
الجمعة فبراير 28, 2014 6:07 pm من طرف ahmdsalem
» الكتاب الاسود - قصة تعذيب المسلمين فى عهد حسنى مبارك
الجمعة فبراير 28, 2014 5:55 pm من طرف ahmdsalem
» الكتاب النادر اول حوار صحفى مع جنى مسلم
الجمعة فبراير 28, 2014 5:54 pm من طرف ahmdsalem
» كتاب نهاية اسرائيل والولايات المتحدة الامريكية
الجمعة فبراير 28, 2014 5:51 pm من طرف ahmdsalem
» كتاب ( الحلم اليهودى والوهم الماسونى )
الجمعة فبراير 28, 2014 5:48 pm من طرف ahmdsalem
» Internet Download Manager 6.05 Build 2 Final
الأربعاء فبراير 26, 2014 3:53 pm من طرف JAMALSAEED
» مجموعه كتب رائعة - متنوعة
الثلاثاء أكتوبر 15, 2013 2:16 pm من طرف eng_eyad
» فن الالقاء الرائع للدكتور طارق سويدان
الثلاثاء أكتوبر 15, 2013 2:12 pm من طرف eng_eyad
» شرح بالصور لكيفية صنع نسخة ويندوز خاصة بك واضافه البرامج والتعريفات لها
الجمعة سبتمبر 13, 2013 3:48 pm من طرف كوبرا
» تحويل الملفات الى PDF بدون برامج
الخميس سبتمبر 12, 2013 2:32 am من طرف عيسى101
» Hiren's BootCD 13.1
الأحد سبتمبر 01, 2013 2:58 pm من طرف تركي غانم
» نزهة الألباب فيما لا يوجد فى كتاب - من كتب الثقافة الجنسية العربية
الجمعة مايو 24, 2013 5:54 am من طرف sadeem.alcoon
» شقائق الاترج فى رقائق الغنج - من كتب الثقافة الجنسية العربية النادرة
الجمعة مايو 24, 2013 5:07 am من طرف sadeem.alcoon
» الحرام - مغامرات حقيقية لأميرة سعودية
الخميس مايو 09, 2013 5:32 am من طرف عمر صالح
» عملية ذبح نمر وسلخ جلدة- حصرية ونادرة جداجداجدا
الخميس مايو 09, 2013 5:27 am من طرف عمر صالح