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

10 lines
246 B
MySQL
Raw Permalink Normal View History

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `account`.`emailUser`
AS SELECT `u`.`id` AS `userFk`,
concat(`u`.`name`, '@', `mc`.`domain`) AS `email`
FROM (
`account`.`user` `u`
JOIN `account`.`mailConfig` `mc`
)