Get the App
SLTechnology News&Howtos  ›  Database  › 

How to use the FROM clause in SQLite

Shulou Source: shulou.com Published: 2022-05-31 12:32:55 11月15日 Update

This article mainly introduces how to use the FROM clause in SQLite. It is very detailed and has a certain reference value. Friends who are interested must finish it!

FROM clause in SQLite

The FROM clause can get one or more source tables from the database. The source table is usually a table named by the database, but it can also be a view or subquery. The subquery has more details, which we will cover later. When multiple source tables are obtained, the JOIN operator combines the source tables and produces a larger table.

Note: the JOIN operator is judged from left to right, and each JOIN operator combines two tables into a larger table, using this principle to string a series of JOIN operators together to combine three or more tables.

[example 3-2] here we will use the JOIN operator to combine the Students and Persons source tables obtained by the FROM clause into one large table. The corresponding SQL statement is as follows:

SELECT * FROM Students JOIN Persons

Run the program, and the execution effect is shown in figure 3.8.

Figure 3.8 running effect

Note: the content in figure 3.9 is the content in the Persons table.

Figure 3.9 Persons table

The above is all the content of the article "how to use the FROM clause in SQLite". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Clause operator operation content multiple more larger effect data database article query run three two value information interest principle boy Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Docker Linux Shulou Technology Shulou Information