HOME | PHP Tutorial | CSS
facebook icon
AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP
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

2563. SQL Aliases - SQL Tutorial

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

2578. SQL LIKE - SQL Tutorial

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

2086. SQL Tutorial | Database Tutorial | Examples
SQL Tutorial for SQL Server. For beginners with examples.
https://www.dofactory.com/sql/tutorial

2585. SQL Server - SQL Tutorial

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

2587. SQL Training - SQL Tutorial

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

48. SQL Tutorial - An Ultimate Guide for Beginners
SQL Tutorials for Beginners - Learn the concepts of world
https://www.tutorialrepublic.com/sql-tutorial/

Your add here
How to get PHP errors to display?
How to prevent sql injection in php mysqli
How do I get PHP errors to display - PHP error_reporting()
mysql_query(): The mysql extension is deprecated and will be removed i
Function eregi_replace() is deprecated in php - How to fix
PHP delete an element from an array
Uncaught Error: Call to undefined function MYSQL_NUM_ROWS() in
Deprecated: mysql_connect() mysql extension is deprecated and will be
mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean g
SQL IN Operator - example
SQL BETWEEN Operator
SQL like syntax and example
SQL WHERE AND & OR multiple conditions
SQL create table primary key autoincrement
PHP mysqli_connect () Function
SQL COUNT(), AVG() and SUM() Functions
Display data from SQL database with MySQLi into php - html table
SQL CREATE DATABASE - example
SQL mysql order by columns, by date, by asc, by desc, random with PHP
PHP mysqli_query() Function - mysqli query
SQL delete row - SQL delete table
SQL update - SQL update select
Insert into SQL - Insert into table SQL - Insert data in sql
Login in PHP - simple login script with PHP MYSQL