2
Guys I’m starting in this business and having difficulty in selecting in more than one table.
My selection command was as follows:
Table 01:
select * from veiculo;
|id_veiculo|modelo|cor|placa|chassi|renavam|combustivel|ano|hp|id_proprietario|id_uf|id_fabricante| |101001|Logan|Preta|JHE-3814|1234BFBF12|DF1234BR1234|GASOL/ALCOOL|2012|77|100|1|1010| |101002|Corolla|Prata|JHJ-0007|2222BFBF22|DF4321BR4321|GASOLINA|2007|107|101|2|1011| |101003|Strada|Vermelha|JHA-1221|3333BFBF11|MG0202BR4321|ALCOOL|2015|132|102|3|1012|
Table 02:
select * from fabricante;
|id_fabricante|nome|presidente|observacoes |1010|Pedro Motta|RENAULT|Presidente da Renault em São Paulo e Rio de Janeiro| |1011|Silvia Santos|TOYOTA|Presidente da Toyota em Brasília, Porto Alegre e Campo Grande| |1012|Fausto Silva|FIAT|Presidente da Fiat no Brasil
This SQL is giving error:
SELECT t1.*,t2.* FROM veiculo t1, fabricante t2
WHERE t1.id_fabricante= t2.id_fabricante AND t1.veiculo
LIKE "JHJ%" AND t1.ano <> 2000 AND t1.combustivel="GASOLINA" AND t2.presidente="TOYOTA";
ERROR 1054 (42S22): Unknown column 't1.vehicle' in 'Where clause'
Where is the error?
caracas, I’m hours trying to find the error.
– Davi Nascimento
Thank you very much
– Davi Nascimento
@Davinascimento how good it was solved... can mark the answer as correct? :)
– Rafael Withoeft
Not yet consig
– Davi Nascimento