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
- DataAccess
- 덴드로그램
- pandas
- Machine Learning
- wcss
- hierarchical_clustering
- matplotlib
- sklearn
- function
- string
- nan
- dendrogram
- 최솟값
- IN
- len()
- elbow method
- analizer
- data
- Dictionary
- list
- 최댓값
- del
- insert()
- count()
- 반복문
- DataFrame
- numpy
- 분류 결과표
- append()
- Python
Archives
- Today
- Total
개발공부
[MYSQL] 컬럼 합치기 concat(), concat_ws() 본문
아래와 같은 books 테이블이 있다.

컬럼 합치기 concat(), concat_ws()
author_fname과 author_lname을 합쳐서 full_name으로 가져오기
concat()
select concat(author_fname, ' ', author_lname) as full_name
from books;

concat_ws()
첫번째 파라미터의 문자를 다른 컬럼이 올때마다 넣어서 붙인다.
select concat_ws(' ',author_fname, author_lname, pages)
from books;

'Database > MySQL' 카테고리의 다른 글
| [MySQL] 데이터 중복 없이 선택 distinct, 데이터 정렬 order by (0) | 2022.05.16 |
|---|---|
| [MySQL] 문자열 교체 replace(), 거꾸로 변경 reverse(), 길이 구하기 char_length(), 대소문자 변경 upper(), lower() (0) | 2022.05.16 |
| [MySQL] 문자열의 일부분만 가져오기 substr(), substring() (0) | 2022.05.16 |
| 데이터 조작어 DML (INSERT, UPDATE, DELETE, SELECT) (0) | 2022.05.16 |
| MYSQL Workbench 스키마 생성하기, 테이블 생성하기 (0) | 2022.05.13 |