DD.WellWorkover.Cloud/AsbCloudDb/UsefulQueries/add_all_permissions_to_root.sql

12 lines
392 B
SQL

-- Добавить все отсутствующие разрешения группе root.
insert into t_relation_user_role_permission
(select
1 as id_user_role,
id as id_permission
from t_permission
where id not in (
select
t_relation_user_role_permission.id_permission
from t_relation_user_role_permission
where id_user_role = 1)
);