The SQL SELECT Statement – Query Examples

The SQL SELECT Statement

  • With the select statement we can easily retrieve data from databases.
  • It’s the most used statement in every database language.
  • Returns data like a table, called result-set

Syntax

Select columnNames from tableName

If all columns were selected then we can use * (star) instead of column names
If there are two or more colums then column names are separated by commas.

Click here to download sample library database

Basic Select Examples

Example1- List all students

Result Of Query

505 rows

Example 2- List only name and surname of all students

Result Of Query

505 rows

Example 3- List book names and pagecount

Result Of Query;

168 rows

YOU MAY WANT TO SEE OUR ALL EXAMPLES PAGE, THEN CLICK HERE

About the author

admin

1 Comment

Leave a Comment

%d bloggers like this: