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

SQL SELECT, WHERE clause, LIKE operator


SQL SELECT, WHERE clause, LIKE operator

When you define the condition in the WHERE clause, you can use the LIKE or SIMILAR TO operator with regular expression (wildcards).

Wildcards are special characters used with the LIKE (SIMILAR TO) operators to substitute one or more characters of a string. It is used when defining similar searches, pattern searches, range searches, or set searches.

Where condition, LIKE operator, syntax

SELECT * FROM books WHERE cost LIKE ‘regular expression1’;

SELECT title, author FROM books WHERE author LIKE ‘regular expression1’;

SELECT statement with WHERE, LIKE operator, examples

SELECT title, author FROM books WHERE author LIKE ’S%’;

Copyright © 2024 · All Rights Reserved · PrimaSoft PC