Showing posts with label WildCharacters in Sql. Show all posts
Showing posts with label WildCharacters in Sql. Show all posts

Sunday, May 10, 2009

WildCharacters in Sql

Hi,
Here are the query results using Wild card Character.Consider below table
Student:

Now Consider the Query

Select * from student Where Name like ‘John%’.

It return results as name starts with john . You will get the result as



Select * from student Where Name like ‘%John’. It results as



Select * from student Where Name like ‘%John%’. It results as



Select * from student Where Class like ‘Fo_r’. '_' matches single character and replace it