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

SQL SELECT, WHERE clause, IN operator


SQL SELECT, WHERE clause, IN operator

When you define the condition in the WHERE clause, you can use the IN operator. After the IN you define the list of values.

Where condition, IN operator, syntax

SELECT * FROM books WHERE category IN (value1, value2, value3, …);

SELECT title, author FROM books WHERE category IN (value1, value2, value3, …);

SELECT statement with WHERE, IN operator, examples

SELECT title, author FROM books WHERE category IN (‘Science’,’Geography’,’Bilology’);

Copyright © 2024 · All Rights Reserved · PrimaSoft PC