GO
CREATE TABLE OduncAl(
YapilanIslemSayisi INT IDENTITY(1,1),
ISTE_no int PRIMARY KEY NOT NULL,
Ad varchar(25) NOT NULL,
Soyad varchar(25) NOT NULL,
AlinanKitapNo int NOT NULL,
AlisTarihi date NOT NULL,
SonIadeTarihi date NOT NULL,
Ceza bit NOT NULL,
KitapYorumu varchar(300) NULL
)
GO
/*ALTER DATABASE ISTEKutuphane
MODIFY FILE
(
NAME=Kitaplik,
SIZE=250MB
);
*/
ALTER TABLE OduncAl --TABLOMUZA SÜTUN EKLEDİK...
ADD
CezaSuresi int DEFAULT(0)
ALTER TABLE OduncAl --TABLOMUZA SÜTUN EKLEDİK...
ADD
CezaSuresiSilinecek int DEFAULT(0)
SELECT *FROM OduncAl
--DROP TABLE OduncAl tablomuzu siler
INSERT INTO OduncAl VALUES(10101,'Gokhan','Guzelkokar',143,'2018-01-06','2018-01-26',0,NULL,NULL,NULL)
INSERT INTO OduncAl VALUES(10105,'Hasan','Selvi',123,'2018-01-06','2018-01-26',0,NULL,NULL,NULL)
INSERT INTO OduncAl VALUES(10145,'Selen','Bakmaz',132,'2018-01-07','2018-01-27',0,NULL,NULL,NULL)
INSERT INTO OduncAl VALUES(10112,'Merve','Soylu',42,'2018-01-06','2018-01-26',0,NULL,NULL,NULL)
INSERT INTO OduncAl VALUES(10162,'Şinasi','Şaşmaz',53,'2018-01-01','2018-01-21',0,NULL,NULL,NULL)
INSERT INTO OduncAl VALUES(10117,'Tahir','Gürsoy',35,'2018-01-06','2018-01-26',0,NULL,NULL,NULL)
--TABLOMUZA VERİLERİMİZİ EKLEDİK
UPDATE OduncAl SET Ceza=1,CezaSuresi=10
WHERE ISTE_no=10101 --GUNCELLEME YAPTIK
/*CREATE LOGIN ISTEKutuphane WITH PASSWORD='LOGIN_SIFRESI'
CREATE USER KutuphaneUser FOR LOGIN ISTEKutuphane;
VERİTABANIMIZA DIŞARIDAN ERİŞEBİLMEK İÇİN
YETKİLENDİRME
GRANT ALL TO KutuphaneUser
GRANT CREATE TABLE TO KutuphaneUser --TABLO YARATMA YETKİSİ
AYNI ŞEKİLDE
DENY CREATE TABLE TABLO OLUŞTURMA YETKİSİNİ KALDIRMA
REVOKE ALL TO PUBLİC --PUBLİC'E VERİLEN TÜM YETKİLERİ KALDIRMA
*/