O'Reilly logo

Practical Web Technologies by V. Lau, P. K. Yuen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required