Delete 문

SQL

DELETE FROM [ ONLY ] table_name [ * ] [ [ AS ] alias ]
    [ USING from_item [, ...] ]
    [ WHERE condition | WHERE CURRENT OF cursor_name ]
    [ RETURNING * | output_expression [ [ AS ] output_name ] [, ...] ]

SQL 예시

## 단일 값 삭제 
# 이름이 Thomas인 record 삭제 
DELETE FROM employee WHERE name = 'Thomas';

## 여러 값 삭제 
# salary가 50000이상인 레코드 삭제 
DELETE FROM employee WHERE salary > 50000;

## 전부 삭제 
DELETE FROM employee;