티스토리 뷰
728x90
INSERT INTO lee(exp_id, created_by, location, animal, starttime, endtime, entct,
inact, inadur, inadist,
smlct, smldur, smldist,
larct, lardur, lardist,
emptyct, emptydur)
SELECT id, uid, t.location, t.animal, t.starttime, t.endtime, t.entct,
t.inact, t.inadur, t.inadist,
t.smlct, t.smldur, t.smldist,
t.larct, t.lardur, t.lardist,
t.emptyct, t.emptydur
FROM tmp t WHERE uid=x
ON DUPLICATE KEY UPDATE entct=t.entct, inact=t.inact, ...
https://stackoverflow.com/questions/2472229/insert-into-select-from-on-duplicate-key-update
INSERT INTO ... SELECT FROM ... ON DUPLICATE KEY UPDATE
I'm doing an insert query where most of many columns would need to be updated to the new values if a unique key already existed. It goes something like this: INSERT INTO lee(exp_id, created_by, ...
stackoverflow.com
https://devlog-wjdrbs96.tistory.com/365
[MySQL] Upsert 쿼리란 무엇일까?
MySQL Upsert 사용법 이번 글에서는 MySQL 에서 Upsert 쿼리를 사용하는 법에 대해서 정리해보겠습니다. Upsert는 이름에서 어느정도 유추할 수 있듯이 Update + Insert 를 합친 말입니다. 즉, Upsert는 중복되
devlog-wjdrbs96.tistory.com
728x90
'공부' 카테고리의 다른 글
[scala] javaMap to scalaMap (0) | 2022.08.31 |
---|---|
[Scala] foreach Map (0) | 2022.08.31 |
[python] if some_string: (some_string is empty) (0) | 2022.08.31 |
[python] slack chat & files (1) | 2022.08.31 |
[aws] s3 cp github action (workflow) (0) | 2022.08.31 |
댓글
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 팔로워 수 세기
- 테슬라 레퍼럴 코드 확인
- 테슬라 크레딧 사용
- 책그림
- 유투브
- 테슬라 레퍼럴
- 레퍼럴
- 테슬라 추천
- 테슬라 리퍼럴 코드 혜택
- 김달
- follower
- 개리마커스
- wlw
- 모델y
- 어떻게 능력을 보여줄 것인가?
- 테슬라
- 할인
- Bot
- 테슬라 레퍼럴 적용 확인
- 메디파크 내과 전문의 의학박사 김영수
- 클루지
- Kluge
- COUNT
- 모델 Y 레퍼럴
- 테슬라 리퍼럴 코드 생성
- 연애학개론
- 인스타그램
- 테슬라 리퍼럴 코드
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함