본문 바로가기
안드로이드(Android)

sqlite 구조보기

by 하센세 2013. 9. 10.

sqlite> pragma table_info(CITY_INFO);
0|CITY_ID|INTEGER|1||0
1|CITY_NAME|TEXT|1||0
2|UPDATE_DATE|TIMESTAMP|0|CURRENT_TIMESTAMP|0

또는

sqlite> select * from sqlite_master where tbl_name='CITY_INFO';
table|CITY_INFO|CITY_INFO|13|CREATE TABLE CITY_INFO
(
CITY_ID INTEGER NOT NULL, 
CITY_NAME TEXT NOT NULL ,
UPDATE_DATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)




sqlite> pragma table_info(sqlite_master);
0|type|text|0||0
1|name|text|0||0
2|tbl_name|text|0||0
3|rootpage|integer|0||0
4|sql|text|0||0