Created
February 16, 2017 12:33
-
-
Save acwoss/f25b44083ba4b9786130e79185bdb8a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table empresas | |
( | |
id int, | |
name varchar(255) | |
); | |
create table diretores ( | |
id int, | |
name varchar(255), | |
empresa int | |
); | |
insert into empresas (id, name) values (1, "empresa_1"); | |
insert into diretores (id, name, empresa) values (1, "diretor_1", 1); | |
insert into diretores (id, name, empresa) values (2, "diretor_2", 1); | |
select count(*) from diretores where empresa = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment