[redes] Re: SQL 30-10

  • From: Gustavo O Ph <gustavoph80@xxxxxxxxx>
  • To: redes@xxxxxxxxxxxxx
  • Date: Wed, 30 Oct 2013 09:26:35 -0200

ex.5

select (vtc.cod_cidade) as "Código Cidade",
  upper(vtc.nome_cidade) as "Cidade",
  vte.cod_estado as "Código Estado",
  vte.nome_estado as "Estado"

from vtcidade vtc

join vtestado vte on vte.cod_estado = vtc.cod_estado

where (vtc.cod_cidade > 10 and vtc.cod_cidade < 50)
and    vtc.nome_cidade like '%a%'
order by vtc.cod_cidade asc


Em 30 de outubro de 2013 09:00, Gustavo O Ph <gustavoph80@xxxxxxxxx>escreveu:

> select (vtc.cod_cidade) as "Código",
>   upper(vtc.nome_cidade) as "Cidade"
>
> from  vtcidade vtc
>
> where (vtc.cod_cidade > 10 and vtc.cod_cidade < 50)
> and    vtc.nome_cidade like '%a%'
> order by vtc.cod_cidade asc
>
>
>
> Em 30 de outubro de 2013 09:00, Gustavo O Ph <gustavoph80@xxxxxxxxx>escreveu:
>
> CORREÇÃO:
>> Ordenar por cod e não nome
>>
>>
>>
>> Em 30 de outubro de 2013 08:59, Gustavo O Ph <gustavoph80@xxxxxxxxx>escreveu:
>>
>> 1 ao 4
>>>
>>> select (vtc.cod_cidade) as "Código",
>>>   upper(vtc.nome_cidade) as "Cidade"
>>>
>>> from  vtcidade vtc
>>>
>>> where (vtc.cod_cidade > 10 and vtc.cod_cidade < 50)
>>> and    vtc.nome_cidade like '%a%'
>>> order by vtc.nome_cidade asc
>>>
>>
>>
>

Other related posts: