This chapter will explain the SELECT and the SELECT * statements. The SQL SELECT StatementThe SELECT statement is used to select data from a database. The result is stored in a result table, called the result-set. SQL SELECT Syntax
and
Note: SQL is not case sensitive. SELECT is the same as select. An SQL SELECT ExampleThe "Persons" table:
Now we want to select the content of the columns named "LastName" and "FirstName" from the table above. We use the following SELECT statement:
The result-set will look like this:
SELECT * ExampleNow we want to select all the columns from the "Persons" table. We use the following SELECT statement:
Tip: The asterisk (*) is a quick way of selecting all columns! The result-set will look like this:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||