salix/db/routines/account/views/myRole.sql

10 lines
256 B
SQL

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `account`.`myRole`
AS SELECT `r`.`inheritsFrom` AS `id`
FROM (
`account`.`roleRole` `r`
JOIN `account`.`user` `u` ON(`u`.`role` = `r`.`role`)
)
WHERE `u`.`id` = `myUser_getId`()