1
주어진 테이블에서; 다음과 같이 특정 열을 표시하도록 쿼리합니다.열로 표시 할 데이터 삭제하기
select an.animals_key,
an.anim_name,
an.sex,
an.date_of_birth,
tt.trait_key,
--case when tt.trait_key = 152 then 'Left Eye Pigment'
--when tt.trait_key = 153 then 'Right Eye Pigment' end as trait_key,
tt.trait_value,
tt.observation_date
from animals an
join traits tt on tt.soc_code = an.soc_code and tt.animals_key = an.animals_key and tt.trait_key in (152,153)
where an.soc_code = 'AUHF' limit 10
이 쿼리는 다음 데이터를 생성합니다.
방법이 열의 개수는 항상 미리 경우 I 그 열에
형질 값이 전혀 다른가요? 그것은 마치'100'처럼 보입니다. – peterm