SQL 문장 – DELETE 문
delete from 테이블명
where 조건;
SQL 문장 – DELETE 문 예제
CREATE TABLE MEMBER(
userid varchar2(12) primary key, -- 아이디
passwd varchar2(12) not null, -- 암호
username varchar(30) not null, -- 이름
tel varchar2(20), -- 전화번호
gender varchar2(3), -- 성별
job varchar2(30), -- 직업
intro varchar2(4000), -- 자기소개
indate date default sysdate -- 가입일
);
INSERT INTO member (userid,passwd,username,tel,gender,job,intro)
VALUES ('Karutabaka','1234','Ayase Chihaya','090-1231-5646','여','학생','karutasuki');
INSERT INTO member (userid,passwd,username,tel,gender,job,intro)
VALUES ('Tensai','1234','Mashima Taichi','090-1231-2331','남','학생','Chihayaga Suki');
INSERT INTO member (userid,passwd,username,tel,gender,job,intro)
VALUES ('Megane','meijin','Yataya Arata','080-2123-1311','남','학생','Sukiya');
commit;
delete from member
where userid = 'Megane' and passwd = 'meijin';