 		ON UPDATE CASCADE
 );
 
---USE [master]
---GO
---DROP LOGIN [manager]
---DROP LOGIN [sales1]
---DROP LOGIN [sales2]
---DROP LOGIN [sales3]
---DROP LOGIN [oper1]
---DROP LOGIN [oper2]
---DROP LOGIN [user1]
---GO
---USE [ChinaMobile]
---GO
---CREATE LOGIN [manager] WITH PASSWORD = '123456798';
---CREATE USER [manager] FOR LOGIN [manager];
---CREATE LOGIN [sales1] WITH PASSWORD = '123456798';
---CREATE USER [sales1] FOR LOGIN [sales1];
---CREATE LOGIN [sales2] WITH PASSWORD = '123456798';
---CREATE USER [sales2] FOR LOGIN [sales2];
---CREATE LOGIN [sales3] WITH PASSWORD = '123456798';
---CREATE USER [sales3] FOR LOGIN [sales3];
---CREATE LOGIN [oper1] WITH PASSWORD = '123456798';
---CREATE USER [oper1] FOR LOGIN [oper1];
---CREATE LOGIN [oper2] WITH PASSWORD = '123456798';
---CREATE USER [oper2] FOR LOGIN [oper2];
---CREATE LOGIN [user1] WITH PASSWORD = '123456798';
---CREATE USER [user1] FOR LOGIN [user1];
-
 CREATE USER [manager] WITHOUT LOGIN;
 CREATE USER [sales1] WITHOUT LOGIN;
 CREATE USER [sales2] WITHOUT LOGIN;

CREATE ROLE [role2];
CREATE ROLE [roleu];

--GRANT CREATE TRIGGER
--ON [ChinaMobile]
--TO [rolem]
--WITH GRANT OPTION;
GRANT INSERT, DELETE, SELECT, UPDATE, ALTER, REFERENCES
ON [BHall]
TO [rolem]


SETUSER 'manager';
INSERT INTO [BHall] VALUES(2, '', 2);
SETUSER;

SETUSER 'manager';
REVOKE SELECT
ON [SaleRecord]
FROM [roleu] CASCADE
AS [rolem];
SETUSER;

SETUSER 'user1';
SELECT * FROM [SaleRecord];
SETUSER;