공부/기타

[SQLite] 기본 쿼리 (select, insert, update, delete query)

01210210 2021. 1. 8. 23:51

1. SELECT 문

 

SELECT [컬럼명1], [컬럼명2] FROM [테이블명];

SELECT column1,column2 FROM table;

 

2. INSERT 문

 

INSERT INTO [테이블명] ([컬럼명1], [컬럼명2]) VALUES([컬럼값1],[컬럼값2]);

INSERT INTO table (column1,column2 ,..) VALUES (value1,value2 ,...);

 

3. UPDATE 문

 

UPDATE [테이블명] SET [컬럼명1] = [컬럼값1], [컬럼명2] = [컬럼값2] WHERE [조건절];
UPDATE table SET column_1 = new_value_1, column_2 = new_value_2 WHERE search_condition;

 

4. DELETE 문

 

DELETE FROM [테이블명] WHERE [조건절];
DELETE FROM table WHERE search_condition;

 

 

** 참고 사이트

 

https://www.sqlitetutorial.net/

 

SQLite Tutorial - An Easy Way to Master SQLite Fast

This SQLite tutorial teaches you everything you need to know to start using SQLite effectively. You will learn SQLite via extensive hands-on practices.

www.sqlitetutorial.net