프로그래밍/DB

postgresql 테이블 조인(join) 예시

kugancity 2019. 4. 27. 16:50
반응형



1. 테이블 사이에 이름이 같은 필드가 없을 경우 


그냥 필드 이름을 나열하고 from 이후 두 개의 테이블을 나열하고 테이블 join 조건을 where에 채워주면 됨 



select name,  area, deposit_date as adate , deposit_min as aprice from table1, table2 where table1.id = table2.hid and type = '1';

728x90
반응형