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 |
Tags
- MySQL
- 메터리얼
- 안드로이드앱
- insert_id
- 디자인패턴
- db
- escape_string
- Query
- 안드로이드 스튜디오
- condensed
- id 얻기
- 머터리얼
- Android
- insertion
- crashlytics
- Auto_increment
- android studio
- 볼륨조절앱
- 파이썬
- mariaDB
- Python
- 데이터베이스
- 알림바
- auto_increment 값
- 안드로이드
- 역슬레시
- soundcontroller
- 볼륨조절어플
- last_insert_id
- mysql_insert_id
Archives
- Today
- Total
목록last_insert_id (1)
장삼의 착한코딩
[데이터베이스] 다음 auto_increment 값 받아오기
query를 사용하다보면 insert시 다음 auto_increment 값이 필요할 때가 있다. select LAST_INSERT_ID() 를 사용할 수도 있지만, LAST_INSERT_ID()는 table을 선택할 수 없다. 그래서 아래의 query를 사용하면 다음 auto_increment의 값을 얻을 수 있다. SELECT AUTO_INCREMENTFROM information_schema.tablesWHERE table_name = 'table name'AND table_schema = DATABASE( ) ;
데이터베이스
2016. 1. 26. 17:45