salix/db/routines/psico/views/examView.sql

13 lines
342 B
SQL

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `psico`.`examView`
AS SELECT `q`.`text` AS `text`,
`eq`.`examFk` AS `examFk`,
`eq`.`questionFk` AS `questionFk`,
`eq`.`answerFk` AS `answerFk`,
`eq`.`id` AS `id`
FROM (
`psico`.`question` `q`
JOIN `psico`.`examQuestion` `eq` ON(`q`.`id` = `eq`.`questionFk`)
)