# STRICT tables for SQLite 초안

> Clean Markdown view of GeekNews topic #4866. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=4866](https://news.hada.io/topic?id=4866)
- GeekNews Markdown: [https://news.hada.io/topic/4866.md](https://news.hada.io/topic/4866.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2021-08-23T09:39:54+09:00
- Updated: 2021-08-23T09:39:54+09:00
- Original source: [sqlite.org](https://www.sqlite.org/draft/stricttables.html)
- Points: 1
- Comments: 0

## Topic Body

- SQLite는 컬럼타입이 INTEGER일때 '123'은 123으로 변환하지만, 'xyz'가 들어오면 데이터 손실이 없도록 'xyz'를 그대로 저장

- 이 유연한 방식을 선호하는 개발자가 많고, 이걸 이점으로 활용함

- 하지만, 이제 기존 DB 처럼 엄격한 타입체크도 가능하도록 3.37 부터 테이블별로 STRICT 지정 가능하도록 할 예정

ㅤ→ CREATE TABLE 마지막에 STRICT 추가하고 모든 필드에 테이터 타입 필수 지정

ㅤ→ INT, INTEGER, REAL, TEXT, BLOB, ANY 타입만 지원

ㅤ→ ANY는 입력된 데이터를 그대로 저장 (기존 STRICT가 아닌 테이블과는 다르게 동작)

## Comments



_No public comments on this page._
