Databases for Windows  /   Database Blog  /   Organizer Advantage, Handy Library, SQL Tutor  /   SQL Select   /  SQL Tutor, Select Where Clouse
28/05/2024

SQL Tutor: SQL SELECT, WHERE clause


The SELECT statement with WHERE

You can limit the number of results displayed to a particular range. The WHERE condition specifies the criteria for the process. The WHERE condition defines a filter.

SELECT with WHERE syntax

You can select some data fields from the table.

SELECT columnname1, columnname2 FROM table_name WHERE condition;

You can select all the fields available in the table, in this case use "*".

SELECT * FROM table_name WHERE condition;

SELECT statement with WHERE examples

SELECT title, author FROM library WHERE author='AUTHOR NAME';

For example, the above statement displays a list of books from the library table by AUTHOR NAME.

SELECT * FROM library WHERE author=’AUTHOR NAME’;

The above SELECT statement displays all data fields from the library table.

Copyright © 2024 · All Rights Reserved · PrimaSoft PC