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

10 lines
256 B
MySQL
Raw Normal View History

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`()