본문 바로가기

DB/SQLite

[ SQLite ] table 보기, table 구조 보기

반응형

1. SQLite 시작하기

 

# sqlite3 example.db

 

2. db 보기

 

현재 사용하고 있는 데이터베이스를 확인한다.

sqlite> .database
main: /home/ubuntu/db/main.db

 

 

3. table 보기

 

현재 사용하고 있는 데이터베이스에 있는 table을 모두 보여 준다.

sqlite> .tables
table1 table2

 

 

4. table 구조 보기

 

sqlite> .schema
CREATE TABLE tabl31( id, column1 text, column2 text);
CREATE TABLE table2( id, column1 text, column2 text);

 

5. 종료 하기

sqlite> .quit
반응형

'DB > SQLite' 카테고리의 다른 글

Ubuntu에 SQLite 설치하기  (0) 2021.01.13