728x90
반응형
컬럼 추가
alter table mytable add column new_column;
ex)
alter table user add column address text;
http://www.devkuma.com/books/pages/1277
컬럼 삭제
BEGIN TRANSACTION;
CREATE TEMPORARY TABLE t1_backup(a,b);
INSERT INTO t1_backup SELECT a,b FROM t1;
DROP TABLE t1;
CREATE TABLE t1(a,b);
INSERT INTO t1 SELECT a,b FROM t1_backup;
DROP TABLE t1_backup;
COMMIT;
이 예제를 참고하여 수행
728x90
반응형
'Database' 카테고리의 다른 글
[MongoDB] collection or index disappeared when cursor yielded: CappedPositionLost: CollectionScan died due to position in capped collection being deleted. 에러 (0) | 2020.10.15 |
---|---|
[SQLite] CRUD 구문 (0) | 2020.10.12 |
[Sqlite] Node.js Sqlite run() callback 받는 법 (0) | 2020.09.25 |
SQL DB와 No-SQL DB의 정의, 종류, 특징, 차이 (1) | 2020.09.24 |
Mongo DB 특징 (0) | 2019.02.15 |