I want to reference a foreign key from a different bank, I have seen in some forums that it is only necessary to 'nome_database'.'nome_tabela'
, but it is not working.
My code is as follows:
ALTER TABLE 'relatorio_gestao'.'usuario_setores'
ADD CONSTRAINT 'id_unidade_ifpe'
FOREIGN KEY ('id_unidade_ifpe')
REFERENCES 'bancobase'.'unidade_ifpe' ('id_unidade_IFPE')
ON DELETE NO ACTION
ON UPDATE NO ACTION;
What am I doing wrong?