AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL

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

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Home - Database
SQL - Database
SQL Syntax
SQL Select Data
SQL Insert Data
SQL Update
SQL Delete Row
PHP mysqli_query()
SQL order
SQL Create Database
SQL Display Data
SQL Count()
SQL mysqli_connect
SQL create table
SQL Where And & Or
SQL like Syntax
SQL Between Operator
SQL IN Operator
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Error: Unable to connect to MySQL. Debugging errno: 1045 Debugging error: Access denied for user 'u142985959_ager'@'localhost' (using password: YES)