Laboratoriya mashg’ulotlarida berilgan topshiriqlar Создание таблиц


Download 416.23 Kb.
bet14/21
Sana19.08.2023
Hajmi416.23 Kb.
#1668308
1   ...   10   11   12   13   14   15   16   17   ...   21
Bog'liq
SQL command 29-11-2021 (5)

Example


Let's look at some examples of how to revoke privileges on tables in SQL Server.
For example, if you wanted to revoke DELETE privileges on a table called employees from a user named anderson, you would run the following REVOKE statement:
REVOKE DELETE ON employees FROM anderson;
If you wanted to revoke ALL ANSI-92 permissions (ie: SELECT, INSERT, UPDATE, DELETE, and REFERENCES) on a table for a user named anderson, you could use the ALL keyword as follows:
REVOKE ALL ON employees FROM anderson;
If you had granted SELECT privileges to the public role (ie: all users) on the employees table and you wanted to revoke these privileges, you could run the following REVOKE statement:
REVOKE SELECT ON employees FROM public;

DENY – ob’yekt bilan har qanday amal bajarishni taqiqlaydi (shunu


aytish kerakki, REVOKE buyrig’i faqat imtiyozlarni olib tashlayi). Foydalanuvchiga ruxsat olish funktaiyalarini quyidagi buyruqlar amalga
oshiradi:


DENY CREATE TABLE, CREATE PROCEDURE
TO peter;


USE sample;
GRANT SELECT ON project
TO PUBLIC;
DENY SELECT ON project
TO peter, mary;


CREATE DATABASE — ma’lumotlar bazasini yaratish huquqi;
CREATE DEFAULT — jadval ustunlari uchun standart qiymatlarni o’rnatish huquqi;
CREATE PROCEDURE — saqlanadigan protseduralarni yaratish huqiqi;
CREATE ROLE — jadval ustunlari uchun qoidalarni o’ranish huquqi; CREATE TABLEjadvallarni yaratish huquqi;
CREATE VIEW — ob’ekt tasvirlarini yaratish huquqi;

Download 416.23 Kb.

Do'stlaringiz bilan baham:
1   ...   10   11   12   13   14   15   16   17   ...   21




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling