MySQL datetime 날짜로 select하기
MySQL datetime 날짜로 select하기 select 컬럼명 from 테이블명 where date(컬럼명)='2018-01-23'; select 컬럼명 from 테이블명 where 컬럼명 between '2018-01-20' and '2018-01-24'; 위의 2가지 방법이 가장 기본적인 쿼리이다.
public class InsertionSort {
public static void main(String[] args) {
int[] index = { 4, 1, 3, 5, 2 };
int i, j, temp, in;
for (i = 1; i < index.length; i++) {
in = index[i];
for (j = i - 1; (j >= 0) && (in < index[j]); j--) {
index[j + 1] = index[j];
}
index[j + 1] = in;
}
for (i = 0; i < index.length; i++) {
System.out.print(index[i] + " ");
}
}
}
댓글
댓글 쓰기