|
Continents |
Country |
Continent |
India |
Asia |
USA |
N.America |
Italy |
Europe |
|
---- Low Performance by using SUBSTRING
SELECT * FROM Continents
WHERE SUBSTRING(Country,1,1) = 'I'
---- High Performance by using LIKE
SELECT * FROM Continents
WHERE Country LIKE 'I%'
---- both Queries will give the same output but Performance is different, if the data is tooooo big
|
Output |
Country |
Continent |
India |
Asia |
Italy |
Europe |
|