SELECT Query in SQLite

SQLite SELECT Query To fetch data from a table, the SELECT statement is used in SQLite.

Syntax 1: To select specific fields from a table.

SELECT column_1, column_2, column_N   
FROM table_name   
WHERE expression;   

Syntax 2: To select all fields from a table.

SELECT * FROM table_name;  

Example:

SELECT * FROM TEACHERS;

Output:

ID NAME SUBJECT
1 Jim English
2 John Geology
3 Watson French
4 Holmes Chemistry
5 Tony Physics

Explanation: The “TEACHERS” is an already existing table. Here we are selecting all the fields of the table.

Please follow and like us:
Content Protection by DMCA.com