HOME | PHP Tutorial | CSS
facebook icon
AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP
PHP Tutorial

PHP forms
HTML Tutorial

CSS Tutorial

SQL like syntax and example

SQL LIKE operator is used in a WHERE clause to search into database for a specified pattern in a column.
There are two wildcards used in conjunction with the LIKE operator:
1. % The percent (%) sign represents zero, one, or multiple characters 2. _ The underscore (_) represents a single character

LIKE Operator --- Description
WHERE Users LIKE 'a%' --- Finds any values that start with "a"
WHERE Users LIKE '%a' --- Finds any values that end with "a"
WHERE Users LIKE '%com%' --- Finds any values that have "com" in any position
WHERE Users LIKE '_e%' --- Finds any values that have "e" in the second position
WHERE Users LIKE 't_%_%' --- Finds any values that start with "t" and are at least 3 characters in length
WHERE Users LIKE 'g%e' --- Finds any values that start with "g" and ends with "e"

SQL LIKE Syntax
SELECT column1, column2, column3
your-tabel-name
WHERE columnS LIKE pattern;


SQL LIKE Examples - how to create - example


The following SQL statement selects all customers with Users starting with "c":

Example 1
SELECT * FROM ColumsName
WHERE Users LIKE 'c%';


The following SQL statement selects all customers with users that have "geo" in any position:

Example 2
SELECT * FROM Customers
WHERE CustomerName LIKE '%or%';

Note: You can also combine any number of conditions using AND or OR operators.


SQL like SQL like syntax and example - sql tutorial

3289. SQL create table primary key autoincrement, sql tutorial
SQL create table primary key autoincrement sql tutorial
https://www.agernic.com/sql-tutorial/sql-create-table-primary-key-autoincrement.html

2588. SQL UPDATE - SQL Tutorial

http://www.sql-tutorial.net/SQL-UPDATE.asp

2560. Disclaimer - SQL Tutorial

http://www.sql-tutorial.net/disclaimer.asp

3284. PHP mysqli_query() Function - mysqli query, sql tutorial
PHP mysqli_query() Function - mysqli query sql tutorial
https://www.agernic.com/sql-tutorial/php-mysqli_query-function-database-mysqli.html

2596. SQL Select data from a database., sql tutorial
SQL Select data from a database. sql tutorial
http://www.agernic.com/sql-tutorial/sql-select-data-from-database.html

2578. SQL LIKE - SQL Tutorial

http://www.sql-tutorial.net/SQL-LIKE.asp

Your add here
PHP html_entity_decode() function

PHP htmlentities() function

PHP empty() Function

PHP ltrim() function

PHP count() Function

PHP htmlspecialchars() function

PHP similar_text() function

PHP wordwrap() function

PHP strrchr() Function

PHP rtrim() function

PHP implode() function

PHP lcfirst() function

PHP strcmp() function

PHP ucwords() function

PHP strip_tags() function

PHP strtolower() function

HTML comment one line and multiple lines
SQL update - SQL update select
Function eregi_replace() is deprecated in php - How to fix
HTML Text Align
How to create HTML link without underline
HTML Text Color Style