18.2. Basic SQL query statements

18.2.1. Using the SELECT statement and logical operators

One way or another, most of the database applications on the Web (or Internet) are SQL based. This may include all kinds of online banking, search engines, and shopping. For most of them, a user-friendly interface is designed to hide the fact that they are actually using the SQL query.

The most frequently used SQL command is the SELECT statement, which generates a table and returns data to the user. For example, we have frequently used

   SELECT * FROM people;

in our previous examples to display all data from the table people. The general syntax of SELECT consists of three parts:

 SELECT field1, field2, field3, ..., fieldN FROM table1, table2, ..., tableK ...

Get Practical Web Technologies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.