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

10 lines
276 B
MySQL
Raw Normal View History

CREATE OR REPLACE DEFINER=`vn-admin`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`workerTeamCollegues`
AS SELECT DISTINCT `w`.`workerFk` AS `workerFk`,
`t`.`workerFk` AS `collegueFk`
FROM (
`vn`.`workerTeam` `w`
JOIN `vn`.`workerTeam` `t` ON(`w`.`team` = `t`.`team`)
)