DISTINCT,AND,OR,NOT,IN,BETWEEN,ORDER BY 사용법
DISTINCT SELECT문의 결과값에서 특정 컬럼만 출력할 경우 중복된 값들이 나오는 경우에 이를 제거해서 표시하는 기능 select CountryCode from city where CountryCode="KOR"; select distinct CountryCode from city where CountryCode="KOR"; 논리 연산자(AND,OR,NOT,IN,BETWEEN) SELECT문의 조건절에 논리 조건 적용 해서 적용할 수 있는 연산자 select * from city where CountryCode="KOR" and Population>=1000000; select * from city where CountryCode="KOR" or CountryCode="JPN"; select * ..
더보기
객체를 원하는 조건에 따라 정렬
객체를 원하는 조건에 따라 정렬 public static void main(String[] args) { int[][] arr = {{1,1},{-1,1},{2,3},{4,3},{0,0},{1,2}}; Coordinate[] coordinates = new Coordinate[arr.length]; for(int i=0; i
더보기