salix/db/routines/hedera/views/mainAccountBank.sql

13 lines
331 B
MySQL
Raw Permalink Normal View History

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `hedera`.`mainAccountBank`
AS SELECT `e`.`name` AS `name`,
`a`.`iban` AS `iban`
FROM (
(
`hedera`.`mainAccount` `c`
JOIN `vn`.`supplierAccount` `a` ON(`a`.`id` = `c`.`accountFk`)
)
JOIN `vn`.`bankEntity` `e` ON(`e`.`id` = `a`.`bankEntityFk`)
)