salix/db/routines/vn/views/workerMedia.sql

8 lines
212 B
MySQL
Raw Normal View History

CREATE OR REPLACE DEFINER=`vn-admin`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`workerMedia`
AS SELECT `w`.`id` AS `workerFk`,
`w`.`phone` AS `mediaValue`
FROM `vn`.`worker` `w`
WHERE `w`.`phone` IS NOT NULL