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

913. MySQL Tutorial in PDF
MySQL Tutorial in PDF - Learn MySQL from basic to advanced covering database programming clauses command functions administration queries and usage along with PHP in simple steps. This tutorial takes you starting from basic to advance MySQL concepts.
https://www.tutorialspoint.com/mysql/mysql_pdf_version.htm

2572. SQL GROUP BY - SQL Tutorial

http://www.sql-tutorial.net/SQL-GROUP-BY.asp

2567. SQL Cheat Sheet - SQL Tutorial

http://www.sql-tutorial.net/SQL-Cheat-Sheet.asp

1942. Online SQL Server Tutorial, Examples, Software, Commands, Online Courses
Online SQL Tutorial pdf, what is SQL, Online Courses, Classes, Training, Tutorials for Beginners - agernic.com is a free interactive Code, Tags, Example
http://www.agernic.com/sql-tutorial.html

3287. SQL COUNT(), AVG() and SUM() Functions, sql tutorial
SQL COUNT(), AVG() and SUM() Functions sql tutorial
https://www.agernic.com/sql-tutorial/sql-count-avg-and-sum-functions.html

3212. Online SQL Server Tutorial, Examples, Software, Commands, Online Courses
Online SQL Tutorial pdf, what is SQL, Online Courses, Classes, Training, Tutorials for Beginners - agernic.com is a free interactive Code, Tags, Example
https://www.agernic.com/sql-tutorial.html

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