<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PersonalBlog &#187; select</title>
	<atom:link href="http://arimita.web.id/tag/select/feed/" rel="self" type="application/rss+xml" />
	<link>http://arimita.web.id</link>
	<description>Just another personal weblog</description>
	<lastBuildDate>Mon, 19 Jul 2010 08:31:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>LIKE and NOT LIKE</title>
		<link>http://arimita.web.id/2010/06/like-and-not-like/</link>
		<comments>http://arimita.web.id/2010/06/like-and-not-like/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 13:57:24 +0000</pubDate>
		<dc:creator>mythworks</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[like]]></category>
		<category><![CDATA[like and not like]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[not like]]></category>
		<category><![CDATA[select]]></category>

		<guid isPermaLink="false">http://arimita.web.id/?p=224</guid>
		<description><![CDATA[The like and not like have two search symbols. The underscore _ character that looks for one character and the percentage % character that looks for zero or more characters. I use function  table which has function_name,  function_name and function_description fields. Lets see the example:

SELECT *
FROM `functions`
WHERE function_name LIKE 'a%'
LIMIT 0 , 30

Above query will [...]]]></description>
			<content:encoded><![CDATA[<p>The like and not like have two search symbols. The underscore _ character that looks for one character and the percentage % character that looks for zero or more characters. I use function  table which has function_name,  function_name and function_description fields. Lets see the example:</p>
<pre class="brush: sql;">
SELECT *
FROM `functions`
WHERE function_name LIKE 'a%'
LIMIT 0 , 30
</pre>
<p>Above query will only pick out result that provide a TRUE result according to the WHERE equation. We can see that equation will equal the LIKE value plus some possible extra characters afterwards.</p>
<p>The LIKE search is not case sensitive, so it will accept anything starting with ‘a’ as well.</p>
<p>So how LIKE search can make a different lowercase or uppercase letters? by adding BINARY word after LIKE.</p>
<pre class="brush: sql;">
SELECT *
FROM `functions`
WHERE function_name LIKE BINARY &quot;a%&quot;
LIMIT 0 , 30;
</pre>
<p>And the change the query like below to see the different:</p>
<pre class="brush: sql;">
SELECT *
FROM `functions`
WHERE function_name LIKE BINARY &quot;A%&quot;
LIMIT 0 , 30;
</pre>
<p>Queries using the LIKE or NOT LIKE parameters may be a bit slower than a normal query search considering they are a broader value and do not take advantage of any indexing.</p>
<p>Note: If you want to have an underscore or percentage character actually be part of the search value, put an escape slash \ in front of the character.</p>
<p>The underscore wildcard can be used a number of times to find a specific number of characters. Example, this would be used in an equation to return a value of &#8216;Stan&#8217; plus 3 characters.</p>
<pre class="brush: sql;">
SELECT *
FROM `functions`
WHERE function_name LIKE BINARY &quot;mdat___&quot;
LIMIT 0 , 30;
</pre>
<p>The underscore and percentage characters (also known as wildcard) can be used in front, at the end, or both ends of a value.</p>
]]></content:encoded>
			<wfw:commentRss>http://arimita.web.id/2010/06/like-and-not-like/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

