SQL like
LIKE operator is used to search for a specified pattern in a column. Like keyword is useful when we have to search those values in which there is a specified pattern given by you.
SYNTAX :
SELECT column_name(s) FROM table_name WHERE column_name LIKE pattern;
Read Me
Pattern | Meaning |
---|---|
a% | It will search strings starting from 'a' |
%a | It will search strings ending with 'a' |
$a$ | It will search such strings for 'a' no matter where it is
id | name | age | city | bill |
1 | Tom | 34 | Paris | 5300 |
2 | Jhony | 51 | London | 400 |
3 | Ram | 64 | Delhi | 20000.7 |
4 | Simon | 23 | Portland | 32.65 |