Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT `cadastro_empresa`.*
- FROM `cadastro_empresa` INNER JOIN `cadastro_faixacep` ON `cadastro_empresa`.`id` = `cadastro_faixacep`.`idempresa`
- WHERE cep BETWEEN `cadastro_faixacep`.`cepinicio`and `cadastro_faixacep`.`cepfim`
- GROUP BY `cadastro_empresa`.`nomeempresa`
- ORDER BY `cadastro_empresa`.`id` ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement