Well it happens the following deal to do an inner join to 2 tables by means of its foreign key but it returns empty and there are 2 registers
in serviteca_clientes I have the primary key called cli_identificacion and in serviteca_ventas I have cli_identificacionque is the foreigner
Good to add your foreign key use the following sentence
ALTER TABLE serviteca_sales ADD CONSTRAINT CliVen FOREIGN KEY (cli_identification) REFERENCES serviteca_clientes (cli_identificacion) ON UPDATE CASCADE ON DELETE CASCADE;
SELECT c.cli_identification, c.cli_name
FROM serviteca_sales AS b
INNER JOIN serviteca_clientes AS c
ON (c. cli_identificacion
= b. cli_identificacion
)
WHERE c. cli_identificacion
= b. cli_identificacion
but returns empty and in serviteca_clientes there are 2 records