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

10 lines
264 B
MySQL
Raw Normal View History

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`workerDepartment`
AS SELECT `b`.`workerFk` AS `workerFk`,
`b`.`departmentFk` AS `departmentFk`
FROM (
`vn`.`business` `b`
JOIN `vn`.`worker` `w` ON(`w`.`businessFk` = `b`.`id`)
)