DataBase
-
[DB] 오류 해결하기DataBase 2022. 9. 14. 22:33
함수를 이용하는 실습을 진행하는 도중 발생한 오류 [42000][1064] (conn=20) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'return varchar(255) [42000][1064] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'return varchar(255) begin return '****..
-
[DB SQL] CONCAT 함수DataBase 2022. 9. 14. 16:26
CONCAT 함수란? -> CONCAT은 CONCATENATION의 약자다. concatenation 단어 자체가 '문자열의 연결'이라는 뜻이다. 즉 문자열을 연결하고 싶을 때 우리는 CONCAT을 사용하면 된다. 사용법 CONCAT(문자열 1, 문자열2) 괄호 안에 연결하고 싶은 문자열을 적어주면 된다. SELECT CONCAT('쑨토리의 ' , '블로그~') FROM DUAL; 결과 값은 쑨토리의 블로그~ 가 된다. select member_type,user_id,password,name ,concat(substring(password,1,2), '**') as passwoerd_mask from table_name ; - concat( substring(password,1,2), '**' ) 첫번째..