테이블생성
CREATE TABLE EMP2(
idx number not null primary key,
idx number not null primary key,
name varchar2(20)
);
칼럼추가
ALTER TABLE emp ADD (addr VARCHAR2(50));
칼럼변경
ALTER TABLE emp MODIFY (ename VARCHAR2(50));
칼럼삭제
ALTER TABLE table_name DROP COLUMN column_name
제약조건삭제
ALTER TABLE emp DROP PRIMARY KEY ;
유저가 소유한 모든 테이블 보기
SELECT table_name FROM USER_TABLES;
TRUNCATE
TRUNCATE removes all rows from a table. The operation cannot be rolled back and no triggers will be fired. As such, TRUCATE is faster and doesn't use as much undo space as a DELETE.
SQL> TRUNCATE TABLE emp; Table truncated. SQL> SELECT COUNT(*) FROM emp; COUNT(*) ---------- 0
댓글
댓글 쓰기