0
두 개의 테이블 products
및 dimensions
이 있습니다. dimensions
테이블에는 product_id, name, value, unit 필드가 있습니다.필드의 값에 따라 다른 열을 선택하는 방법
각 차원 이름이 결과에 별도의 열로 나타나도록 이러한 테이블을 조인하려고합니다. 예 : 나는 차원 테이블에 항목을 다음과 같은 한 :
product id, length, length unit, width, width unit, height, height unit
1 10 inches 4 inches
2 5 inches 7 inches
가 어떻게이 사용하는 SQL 쿼리를 얻을 수 있습니다
1, width, 4, inches
2, width, 5, inches
1, length, 10, inches
2, height, 7, inches
나는 결과처럼되고 싶어?
답변 주셔서 감사 많은! – nish