select hit+1 as hit from notice; //컬럼명이 "HIT"가 되도록
select 1+'3' from dual; //더미테이블 제공. 답이 4가 나옴.
//왜? 덧셈은 숫자만 더해주는 연산자임.
select 1 || '3' from dual; // 답 13나옴
select 1+'a' from dual; //number을 바꿀수 없다는 형태의 오류
select name || '(' || id || ')' as name from member
select name || '(' || id || ')' name from member
=, !=, ^=, <>, >, <, >=, <=, IS NULL, IS NOT NULL
!=, ^=(ORACLE), <>(ANSI SQL) 같지않다는 연산자
게시글 중에서 작성자가 'newlac'인 게시글만 조회하시오
select * from notice where writer_id ='newlac';
select * from notice where hit > 3;
select * from notice where 0 <= hit and hit <= 2; //포함되지않을때
select * from notice where hit between 0 and 2; // 포함
select * from notice where hit in (0, 2, 7);
select * from member where name LIKE '박%';
select * from member where name LIKE '박_';
select * from member where name NOT LIKE '박%';
select * from member where name NOT LIKE '%도%';
select * from notice where REGEXP_LIKE(title,'01[016-9]-\d{3,4}-\d{4}');
전화번호만 가지고 있는 컬럼에서는 ^01[016-9]-\d{3,4}-\d{4}$
제목에 전화번호가 아니라 다른것과 함께 들어와있는경우 01[016-9]-\d{3,4}-\d{4}
\D\w*@\w*.(org|net|com)
문자 @ . org net com
[0-9a-zA-Z] : 한 자표현
\w : 알파벳, 숫자기호 _까지 포함
\D : [^0-9] : 0-9까지가 아닌걸로만 올수있음.