본문 바로가기
Data/MySQL

[MySQL] CONCAT-문자열합치기 / ALIAS - 별칭

by prinha 2020. 12. 15.
728x90
반응형

 

1) CONCAT(문자열A, 문자열B, ...)

2) AS 별칭

 

SELECT
	email,
	CONCAT(height, 'cm',', ',weight, 'kg') AS '키와 몸무게',
	weight / ((height/100) * (height/100)) AS BMI
FROM copang_main.member;

728x90
반응형