기초 Coding/SQL
연결연산자 보충
dd0za-1004
2021. 9. 13. 22:15
단일비교연산자
=, >, <, !=, <>(=없는 값이라는 뜻)
where department_id <>90; >> 90이 아닌 모든 부서 아이디 출력
where not department_id = 90 >> 제일 효율낮음
4. 연결연산자
// - 아이디, 성명, 급여 구하기
// - 연결하고자 하는 것에 ,를 써서 연결한다
// select employee_id, first_name, last_name, salary
// from employees;
// - first_name과 last_name을 연결시켜주기
// - || >> 뒤에꺼랑 앞에꺼를 연결
// select employee_id, first_name || last_name, salary
// from employees;
// - 성과 이름 사이에 빈칸 넣어 연결해주기
// - ' ' >> 빈칸을 나타낸다.
// select employee_id, first_name || ' ' || last_name, salary
// from employees;
// - 여백 줄여주기
// --cloumn 길이 조정 (-- : 마이너스 두개는 command의 뜻)
// HR@XE> column department_name format a18
// HR@XE> select * from departments;