Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- intent
- service
- data
- 데이터
- Android
- 데이터전달
- insert
- IntelliJ
- 16197
- Java
- mysql
- vscode
- Algorithm
- goland
- spring
- github
- 단축키
- 17837
- 알고리즘
- 프로그래머스
- 제어반전
- 두 동전
- Jenknis
- activity
- broadcastreceiver
- ubuntu
- git
- 큐빙
- 안드로이드
- 백준
Archives
- Today
- Total
목록mysql (3)
해보자
[Mysql] insert시, 넘버링하기
create CREATE TABLE `table1` ( `column1` INT(10), `column2` INT(10) ); 위와 같은 table이 있다고 가정해보자. insert INSERT INTO table1 ( column1, column2 ) VALUES ( 1, COALESCE((SELECT MAX(t.column2) + 1 FROM table1 t WHERE t.column1 = 1),1) ); 위 질의문을 4번 실행시키면 아래와 같은 결과를 얻을 수 있다.
DB/SQL
2020. 10. 2. 09:01
[CodeIgniter] 레코드 삽입 시, ID 가져오기, 적용되는 열 수 가져오기
방금 삽입된 레코드 ID 가져오기 $this->db->insert_id() 쿼리 적용되는 열 수 가져오기 $this->db->affected_rows() Reference http://www.ciboard.co.kr/user_guide/kr/database/helpers.html
PHP
2020. 10. 2. 08:44