30 lines
465 B
MySQL
30 lines
465 B
MySQL
|
USE [DepartmentDatabasePortal]
|
|||
|
GO
|
|||
|
|
|||
|
DELETE FROM [dbo].[OrderSyncHistories]
|
|||
|
GO
|
|||
|
|
|||
|
DELETE FROM [dbo].[Orders]
|
|||
|
GO
|
|||
|
|
|||
|
DELETE FROM [dbo].[Students]
|
|||
|
GO
|
|||
|
|
|||
|
DELETE FROM [dbo].[StudentGroups]
|
|||
|
GO
|
|||
|
|
|||
|
DECLARE @RoleId uniqueidentifier
|
|||
|
|
|||
|
SELECT @RoleId = [Id]
|
|||
|
FROM [dbo].[Roles]
|
|||
|
WHERE [RoleName] = '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|||
|
|
|||
|
|
|||
|
DELETE u FROM [dbo].[Users] u
|
|||
|
JOIN [dbo].[UserRoles] ur ON u.[Id] = ur.[UserId]
|
|||
|
WHERE ur.[RoleId] = @RoleId
|
|||
|
|
|||
|
|
|||
|
DELETE FROM [dbo].[UserRoles]
|
|||
|
WHERE [RoleId] = @RoleId
|
|||
|
GO
|