How To use LIKE Keyword in SQL Query

Written by admin on Mar 23, 2007
Using Like Keyword in SQL Query

Explanation:

Using a LIKE keyword is very usefull for querying SQL Database when cerating a Search Application.

1. If we were sure of the search key word we can do like this.

SELECT  [Comments]  FROM [Tasks] LIKE="C# Task"

This satment is Equivalent to

SELECT  [Comments]  FROM [Tasks] WHERE="C# Task"


2. If we are not sure for the exext Text and we only know the Part of the Text then:

SELECT  [Comments]  FROM [Tasks] LIKE="%C# Task"

This will work for all Text ending with "C# Task".


3. If you think that the Text is lying some where in the middle of the Text then:

SELECT  [Comments]  FROM [Tasks] LIKE="%C# Task%"
Visitors/Readers Comments
(for questions please use The Forum)



meno

gooooooooooooooood work.!

I like all article and tutorial in this web page.  Now Fast Code is really HOT

Keep it up  

25/03/2007 14:05:34 UTC

Bill Gates

Hi i want you to start working for Microsoft, are u interested.

Contact me on

Regards,

Bill Gates

26/07/2007 05:07:33 UTC

Avinash

Nice Web Page...........................eeeeeeeee..............

23/05/2008 00:10:47 UTC

sudhamani
Good Helper..............

19/07/2008 04:58:20 UTC




Add your Comments

Name:  
Message:


Advertise Here
For more details
Contact Us

Advertisments