select employee_id, last_name, phone_number, LPAD(phone_number, 15, '-')
from employees
# 오른쪽부터 왼쪽으로 갈 때 문자가 없는 곳부터 15칸까지 '-'으로
Bash
복사
select ename, sal, LPAD(sal, 10, '*') as N_SAL from emp;
Bash
복사
select employee_id, last_name, phone_number, RPAD(phone_number, 20, '-')
from employees
# 왼쪽부터 오른쪽으로 갈 때 문자가 없는 곳부터 20칸까지 '-'로
Bash
복사
