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

10 lines
272 B
SQL

CREATE OR REPLACE DEFINER=`root`@`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`)
)