<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3636633552446063973</id><updated>2026-04-07T16:21:59.571-04:00</updated><category term="SQL Tutorial"/><category term="BackTrack USB Installation"/><category term="College bachelor bachelor&#39;s degree cheap quick inexpensive CLEP Dantes FEMA &quot;Bachelor degree by exam&quot;"/><category term="reviews scam biased stars"/><title type='text'>The Newbie hacker guide from a noob himself</title><subtitle type='html'>Where you can learn from my mistakes.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>49</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-627625982711463430</id><published>2009-07-13T20:50:00.003-04:00</published><updated>2009-07-13T20:55:46.025-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="reviews scam biased stars"/><title type='text'>Why most reviews online are biased and curved (and therefore a SCAM)</title><content type='html'>Did you ever notice that most online reviews are curved to the positive? Here&#39;s why.&lt;br /&gt;&lt;span style=&quot;font-size:+0;&quot;&gt;&lt;/span&gt;&lt;br /&gt;Most reviews let you rate a product , &lt;span id=&quot;SPELLING_ERROR_0&quot; class=&quot;blsp-spelling-error&quot;&gt;service&lt;/span&gt;, or company with a rating from 1 to 5. Sounds fair. right? Wrong!!!!&lt;br /&gt;&lt;br /&gt;Take this example:&lt;br /&gt;&lt;br /&gt;We&#39;ll talk about reviews for this widget.&lt;br /&gt;&lt;br /&gt;Mister Aye thinks is the best thing to come out since toilet paper. He quickly gives it a rating of 5.&lt;br /&gt;Miss Bee also bought this product and it broke before she got home. She thinks it&#39;s useless and a total waste of money. She gives it a rating of 1.&lt;br /&gt;Mrs. Sea also buys the product and it simply won&#39;t do what widgets are supposed to do. What a piece of crap. She gives it a rating of 1.&lt;br /&gt;&lt;br /&gt;The average rating is 5+1+1=7 / 3 = 2.33. The site so nicely shows a rating of 2.5 stars (rounded to the nearest half).&lt;br /&gt;&lt;br /&gt;When Mr. Dee comes to the site and checks out the rating, it&#39;s 2.5 stars out of 5 stars. Okay, he says, half the people like it half don&#39;t, an average product. He then decides to buy it, or not.&lt;br /&gt;&lt;br /&gt;Mr. Dee was &lt;span id=&quot;SPELLING_ERROR_1&quot; class=&quot;blsp-spelling-error&quot;&gt;SCAMMMED&lt;/span&gt; by the site. For every one person that likes it, there are two people that think it&#39;s junk. The true rating should be 1.66 (5+0+0=5/3=1.66). I think Mr. Dee may have decided against the purchase had he seen 1.5 stars instead of the 2.5 shown.&lt;br /&gt;In other words, stars are partly a SCAM!!!!!!!!!</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/627625982711463430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/627625982711463430?isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/627625982711463430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/627625982711463430'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2009/07/why-most-reviews-online-biased-and.html' title='Why most reviews online are biased and curved (and therefore a SCAM)'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-6704336806201430804</id><published>2009-07-12T02:21:00.009-04:00</published><updated>2009-07-13T20:38:04.232-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="College bachelor bachelor&#39;s degree cheap quick inexpensive CLEP Dantes FEMA &quot;Bachelor degree by exam&quot;"/><title type='text'>Earn 4 year Bachelor Degree quickly, easily, and for CHEAP - about $5000 or even as low as $3615 (for NJians)</title><content type='html'>&lt;p&gt;Oh, and did I mention without sitting through a single class.&lt;/p&gt;&lt;p&gt;Yeah, you&#39;re figuring it&#39;s another one of those hoaxes. Well, it&#39;s not. I am not selling anything here or offering anything here. All I&#39;m doing is giving you the information that you need to get that degree you need/want. And, believe it or not, I have no gain in this. I just want to help out. I know it&#39;s a rarity these days, but here I am.&lt;/p&gt;&lt;p&gt;Here goes:&lt;/p&gt;&lt;p&gt;Many people are having a hard time getting a job because they have no Bachelor&#39;s degree. Some people are getting passed over for promotions because there&#39;s a degree requirement. What are you to do? You don&#39;t want to spend $15,000 getting your degree. Also, you don&#39;t have time to sit in class or the patience to do the same. &lt;span id=&quot;SPELLING_ERROR_0&quot; class=&quot;blsp-spelling-error&quot;&gt;Hmm&lt;/span&gt;..... is there another alternative? Yes there is and I&#39;ll show you how to do it.&lt;/p&gt;&lt;p&gt;First of all, the breakdown that will follow below is for someone that has no previous college credits. Zero. If you have some, you will have an easier , shorter and cheaper time getting your degree.&lt;/p&gt;&lt;p&gt;To get this degree, you have to be ready to learn enough on many topics to get a passing mark on an exam on that topic. We&#39;re talking &lt;span id=&quot;SPELLING_ERROR_1&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; exams. You may have heard of it before. All it is is a multiple choice exam (usually 100 questions) that covers one topic. The cost is $72 per exam plus you&#39;ll pay a proctor fee, which ranges from $20 to $35 depending where you take it. There&#39;s a bunch of info available online, if you just use the good old google.&lt;/p&gt;&lt;p&gt;Here&#39;s a tip. There&#39;s a site called &lt;span id=&quot;SPELLING_ERROR_2&quot; class=&quot;blsp-spelling-error&quot;&gt;InstantCert&lt;/span&gt;.com. For a minimal price you become a member. This gives you access to practice multiple choice questions on a huge variety of &lt;span id=&quot;SPELLING_ERROR_3&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt;/&lt;span id=&quot;SPELLING_ERROR_4&quot; class=&quot;blsp-spelling-error&quot;&gt;Dantes&lt;/span&gt; exams. From past experience, I have found that using &lt;span id=&quot;SPELLING_ERROR_5&quot; class=&quot;blsp-spelling-error&quot;&gt;InstantCert&lt;/span&gt; will &lt;span id=&quot;SPELLING_ERROR_6&quot; class=&quot;blsp-spelling-corrected&quot;&gt;sufficiently&lt;/span&gt; prepare you to pass the &lt;span id=&quot;SPELLING_ERROR_7&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; exams. I would strongly advise checking it out if you&#39;re gonna this route.&lt;/p&gt;&lt;p&gt;Another part of the trick here is to get 25 free electives through &lt;span id=&quot;SPELLING_ERROR_8&quot; class=&quot;blsp-spelling-error&quot;&gt;FEMA&lt;/span&gt;.gov. They offer small courses online for free. Each short course has an open-book final made up of 25-50 multiple choice questions. For each course you pass, subject to limitations, you&#39;ll get one college credit. These courses take very little time and will give you 24 of the 120 &lt;span id=&quot;SPELLING_ERROR_9&quot; class=&quot;blsp-spelling-error&quot;&gt;credits&lt;/span&gt; you&#39;ll need for the degree.&lt;/p&gt;&lt;p&gt;Here&#39;s the whole story. Thomas Edison State College, which is a fully accredited college in New Jersey, will let you earn a degree even if you don&#39;t take a single course with them. If you fulfill all the &lt;span id=&quot;SPELLING_ERROR_10&quot; class=&quot;blsp-spelling-corrected&quot;&gt;requirements&lt;/span&gt; for a degree wherever however, they&#39;ll let you transfer in the credits and earn the degree. You must, however, enroll in the college, which is half the cost of this degree.&lt;/p&gt;&lt;p&gt;The breakdown of the costs are as follows:&lt;/p&gt;&lt;p&gt;Application fee $75 - this pays for your evaluation which evaluated your previous studies/transcripts&lt;/p&gt;&lt;p&gt;Annual &lt;span id=&quot;SPELLING_ERROR_11&quot; class=&quot;blsp-spelling-corrected&quot;&gt;enrollment&lt;/span&gt; fee (which your only gonna do for one year obviously) - $2520&lt;/p&gt;&lt;p&gt;Annual Technology fee - $103&lt;/p&gt;&lt;p&gt;Graduation fee (which is gonna be pretty much right away) - $247&lt;/p&gt;&lt;p&gt;&lt;strong&gt;So far that&#39;s a total of $2945&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Now comes the fun. You &lt;span id=&quot;SPELLING_ERROR_12&quot; class=&quot;blsp-spelling-error&quot;&gt;are&lt;/span&gt; &lt;span id=&quot;SPELLING_ERROR_13&quot; class=&quot;blsp-spelling-error&quot;&gt;going&lt;/span&gt; to take 21 exams, each giving you 3 or 6 credits. for a total of 96 credits. The other 24 credits will be through &lt;span id=&quot;SPELLING_ERROR_14&quot; class=&quot;blsp-spelling-error&quot;&gt;FEMA&lt;/span&gt;. If you estimate the cost of each exam at $100 (&lt;span id=&quot;SPELLING_ERROR_15&quot; class=&quot;blsp-spelling-error&quot;&gt;it may&lt;/span&gt; be a bit less for you), that&#39;s another $2100&lt;/p&gt;&lt;p&gt;&lt;strong&gt;That brings you to a total of $&lt;em&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;5045&lt;/span&gt;&lt;/em&gt; (See the end of the article to see how it may be way cheaper for you.)&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;PLEASE NOTE: DISCLAIMER: I have not verified all this information with Thomas Edison State College. If you go this route, you may want to apply, get an evaluation, and make sure this is going to work. I just know that I tested out of 15 courses for my degree, and don&#39;t see why this shouldn&#39;t work for you.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Below, I have broken down the &lt;span id=&quot;SPELLING_ERROR_16&quot; class=&quot;blsp-spelling-corrected&quot;&gt;requirements&lt;/span&gt; for the Bachelor&#39;s Degree in Liberal Studies at Thomas Edison State College, and how you&#39;ll fulfill those &lt;span id=&quot;SPELLING_ERROR_17&quot; class=&quot;blsp-spelling-corrected&quot;&gt;requirements&lt;/span&gt; by exam.&lt;/p&gt;&lt;p&gt;A. English Composition (6 credits)&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_18&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; English Composition with Essay (6 credits) &lt;/li&gt;&lt;/ul&gt;B. Humanities (12 credits)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_19&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; American Literature (6 credits) &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_20&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; Humanities - General (6 credits) &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;C. Social Sciences (12 credits) &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_21&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; Social Sciences and History General (6 credits) &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_22&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; American Government (3 credits) &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_23&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; Human Growth and Development (3 credits) &lt;/li&gt;&lt;/ul&gt;D. Natural Sciences and Mathematics (12 credits)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_24&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; College Mathematics General (6 credits) &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_25&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; Natural Sciences - General (6 credits) &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;E. General Education Electives (18 credits)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_26&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; Chemistry (6 credits) &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_27&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; Biology (6 credits) &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_28&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; English Literature (6 credits) &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;F. Liberal Studies (33 credits)&lt;br /&gt;(Only 2 courses can be at the 100 level)&lt;br /&gt;(Must be at least two areas)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_29&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; Analyzing and &lt;span id=&quot;SPELLING_ERROR_30&quot; class=&quot;blsp-spelling-error&quot;&gt;Interpreting&lt;/span&gt; Literature (6 credits) &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_31&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; &lt;span id=&quot;SPELLING_ERROR_32&quot; class=&quot;blsp-spelling-error&quot;&gt;Introduction&lt;/span&gt; to Educational Psychology (3 credits) &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_33&quot; class=&quot;blsp-spelling-error&quot;&gt;Dantes&lt;/span&gt; &lt;span id=&quot;SPELLING_ERROR_34&quot; class=&quot;blsp-spelling-error&quot;&gt;Introduction&lt;/span&gt; to Computing (3 credits) &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_35&quot; class=&quot;blsp-spelling-error&quot;&gt;Dantes&lt;/span&gt; Ethics in America (3 credits) &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_36&quot; class=&quot;blsp-spelling-error&quot;&gt;Dantes&lt;/span&gt; Environment and Humanity: The Race to Save the Plant (3 credits) &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_37&quot; class=&quot;blsp-spelling-error&quot;&gt;Dantes&lt;/span&gt; Lifespan &lt;span id=&quot;SPELLING_ERROR_38&quot; class=&quot;blsp-spelling-error&quot;&gt;Developmental&lt;/span&gt; Psychology (3 credits) &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_39&quot; class=&quot;blsp-spelling-error&quot;&gt;Dantes&lt;/span&gt; &lt;span id=&quot;SPELLING_ERROR_40&quot; class=&quot;blsp-spelling-error&quot;&gt;Organizational&lt;/span&gt; Behavior (3 credits) &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_41&quot; class=&quot;blsp-spelling-error&quot;&gt;Dantes&lt;/span&gt; Drug and Alcohol Abuse &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_42&quot; class=&quot;blsp-spelling-error&quot;&gt;Dantes&lt;/span&gt; Technical Writing &lt;span id=&quot;SPELLING_ERROR_43&quot; class=&quot;blsp-spelling-error&quot;&gt;Dantes&lt;/span&gt; Human/Cultural Geography &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;G. Free Electives (27 credits) &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_44&quot; class=&quot;blsp-spelling-error&quot;&gt;Dantes&lt;/span&gt; Foundations of Education (3 credits) &lt;/li&gt;&lt;li&gt;Free &lt;span id=&quot;SPELLING_ERROR_45&quot; class=&quot;blsp-spelling-error&quot;&gt;FEMA&lt;/span&gt; online courses - 24 courses - 1 credit each course (24 credits) &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;Total credits: 120 credits&lt;/p&gt;&lt;p&gt;Total number of &lt;span id=&quot;SPELLING_ERROR_46&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt;/&lt;span id=&quot;SPELLING_ERROR_47&quot; class=&quot;blsp-spelling-error&quot;&gt;Dantes&lt;/span&gt; exams: 21 exams &lt;/p&gt;&lt;p&gt;Please note: There are many more &lt;span id=&quot;SPELLING_ERROR_48&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; and &lt;span id=&quot;SPELLING_ERROR_49&quot; class=&quot;blsp-spelling-error&quot;&gt;Dantes&lt;/span&gt; exams available that will do the job as well. You should check out all the exams, see which would be easier for you etc. I have, however, used all the 6 credit exams in the &lt;span id=&quot;SPELLING_ERROR_50&quot; class=&quot;blsp-spelling-corrected&quot;&gt;calculations&lt;/span&gt; (see below for an exception).&lt;/p&gt;&lt;p&gt;---------------------------------------------&lt;/p&gt;&lt;p&gt;Now in the &lt;span id=&quot;SPELLING_ERROR_51&quot; class=&quot;blsp-spelling-error&quot;&gt;title&lt;/span&gt; I wrote &quot;or for as low as $&lt;span style=&quot;color:#ff0000;&quot;&gt;3615&lt;/span&gt;&quot;. How do I explain that.It&#39;s actually quite simple. If you live in New Jersey, as I do, then instead of paying $2520 for enrollment, you pay only $1390. That takes $1130 off the costs, bring it down to $3915.&lt;/p&gt;&lt;p&gt;Now if you know Spanish well, or French or German, there is a &lt;span id=&quot;SPELLING_ERROR_52&quot; class=&quot;blsp-spelling-error&quot;&gt;CLEP&lt;/span&gt; exam worth 12 credits that will replace one of the 3 credit exams I counted. This will take $300 off the costs (3 exams less), bringing the cost down to &lt;strong&gt;$3615&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Please leave comments and suggestions if you have any.&lt;/strong&gt;&lt;br /&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;br /&gt;try {&lt;br /&gt;var pageTracker = _gat._getTracker(&quot;UA-9684933-4&quot;);&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;} catch(err) {}&lt;/script&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/6704336806201430804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/6704336806201430804?isPopup=true' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/6704336806201430804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/6704336806201430804'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2009/07/earn-4-year-bachelors-degree-in-half_12.html' title='Earn 4 year Bachelor Degree quickly, easily, and for CHEAP - about $5000 or even as low as $3615 (for NJians)'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-4798141165630300717</id><published>2009-07-08T14:51:00.003-04:00</published><updated>2009-07-08T20:24:53.945-04:00</updated><title type='text'>Experiment</title><content type='html'>EXPERIMENT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I want to try an experiment and I&#39;m willing to spend $50 on it. I am running a &quot;contest&quot;, if you can call it that. I am trying to see how quickly I can get 30,000 unique visitors to this &#39;basically empty site&#39; by offering a small amount of money to one lucky &#39;winner&#39;.&lt;br /&gt;Here how it works.&lt;br /&gt;All you have to do is enter your email address and click submit. It can be address that goes to your garbage mail or wherever. I am really not interested in the address. I will be counting unique IP addresses to this site, or however google analytics categorizes unique visitors. Once the 30,000 mark is hit, I will randomly choose one of the people and email them that they won. They&#39;ll let me know how they want me to pay them. Paypal, check in the mail, or whatever other method they so choose.&lt;br /&gt;Here&#39;s the catch. How can I prove that I&#39;ll actually send the money to the &#39;winner&#39;. I can&#39;t. I give my word, but that&#39;s it. If you don&#39;t want to enter an email address, no problem, You can click away from this &#39;site&#39; the same way you came. This is an experiment and if it fails, so be it. I also give my word that I will not use your email address for any other purpose other than to let you know you&#39;ve won.&lt;br /&gt;Also, you should know that I don&#39;t expect to ever reach the 30,000 mark. I we reach it, I&#39;ll pay out, but I doubt it&#39;ll ever come to that. That&#39;s why it&#39;s an experiment. Experiments usually fail.&lt;br /&gt;If you decide to trust me, or you have an address where all the garbage email goes to anyway, enter it here. Please tell others about this page, so that we can reach the 30,000 mark quickly. If you have any ideas how I can let people know about this page, you can enter it in the comment box.&lt;br /&gt;&lt;br /&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;br /&gt;var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);&lt;br /&gt;document.write(unescape(&quot;%3Cscript src=&#39;&quot; + gaJsHost + &quot;google-analytics.com/ga.js&#39; type=&#39;text/javascript&#39;%3E%3C/script%3E&quot;));&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;br /&gt;try {&lt;br /&gt;var pageTracker = _gat._getTracker(&quot;UA-9684933-2&quot;);&lt;br /&gt;pageTracker._trackPageview();&lt;br /&gt;} catch(err) {}&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/4798141165630300717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/4798141165630300717?isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/4798141165630300717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/4798141165630300717'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2009/07/experiment.html' title='Experiment'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-27675108246671430</id><published>2008-02-05T10:08:00.000-05:00</published><updated>2008-02-05T10:41:36.305-05:00</updated><title type='text'>SQL Basics - Creating and Changing Tables (Last Lesson)</title><content type='html'>Up until now, we dealt with retrieving, inserting, and manipulating data. Today, we&#39;ll discuss manipulating the table itself.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;CREATING A NEW TABLE&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To create a new table, we use the CREATE TABLE clause. When we create the table, we must specify the name of the new table, and the name and datatypes of the columns, with each column separated by a comma. For example, to creat the table &#39;OrderItems&#39; that we&#39;ve been working with, we do the following:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;CREATE TABLE OrderItems&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;(&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;order_num INTEGER NOT NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;order_item INTEGER NOT NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;prod_id CHAR(10) NOT NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;quantity INTEGER NOT NULL DEFAULT 1,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;item_price DECIMAL(8,2) NOT NULL&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;As you can see, we specified the datatype, and if it allows a NULL value or requires you to givwe a value. You can also define a default value, as we&#39;ve done with the quantity column. This creates the table we have used in this tutorial.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;CHANGING AN EXISTING TABLE&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;To make changes to an existing table we use the ALTER TABLE clause. Different applications have very different rules as to when you&#39;re allowed to alter a table, and with what information. Refer to your application documaentation for your specific case. If and when you do add a column to the table, here&#39;s how it&#39;s done:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;ALTER TABLE Orders&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;ADD payment_method CHAR(20);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and when your boss is ready to kill you for what you did, you can remove a column:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;ALTER TABLE Orders&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;DROP COLUMN payment_method;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;Now your boss is ready to fire you for wasting time, so you can really mess him up by deleting the whole table:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;DROP TABLE Orders;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;That&#39;s by far the easiest thing to do so far. I wonder why that is. The guy that wrote this language must&#39;ve have loads of scores to settle.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;THERE IS MUCH MORE TO THE SQL LANGUAGE. BUT I THINK FOR NOW WE&#39;LL LEAVE IT AT THIS. WE WILL BEGIN SQL INJECTION SOON. BUT FIRST I WOULD LIKE TO WRITE ABOUT SETTING UP OUR OWN SQL SERVER SO THAT WE CAN PRACTICE SQL INJECTION WITHOUT GETTING ARRESTED. THEY PROBABLY WOULD BLOCK THIS BLOG FROM JAIL COMPUTERS. WE&#39;LL BE IN TOUCH REAL SOON.</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/27675108246671430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/27675108246671430?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/27675108246671430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/27675108246671430'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/02/sql-basics-creating-and-changing-tables.html' title='SQL Basics - Creating and Changing Tables (Last Lesson)'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-1442435862590541460</id><published>2008-02-04T11:43:00.000-05:00</published><updated>2008-02-04T12:19:04.952-05:00</updated><title type='text'>SQL Basics - Changing and Deleting Data</title><content type='html'>Last post we discussed adding a new entry into a table. Today I want to talk about updating previous data, or deleting it. It&#39;s actually quite simple. To update, we use the UPDATE clause. Cool, isn&#39;t it? Our customer, Fun4all moved, and we want to change his address.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;UPDATE Customers&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SET cust_address = &#39;123 Drunk Drive&#39;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;WHERE cust_id=&#39;100000003&#39;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This replaces the customer&#39;s old address, 1 Sunny Place, with his new address.&lt;br /&gt;&lt;br /&gt;WARNING!!! WARNING!!! WARNING!!! WARNING!!!&lt;br /&gt;&lt;br /&gt;If I had left out the WHERE clause, this query would have gone through without a problem, except that now all my customer&#39;s addresses are &#39;123 Drunk Drive&#39;. You must make sure to use the WHERE clause.&lt;br /&gt;&lt;br /&gt;If we need to change his city and zip too, we can use the same query qith the new fields separated by commas.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;UPDATE Customers&lt;br /&gt;SET cust_address = &#39;123 Drunk Drive&#39;&lt;/span&gt;&lt;span style=&quot;font-family:Georgia;&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;cust_city = &#39;Jailcell&#39;,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;cust_zip = &#39;07734&#39;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;br /&gt;WHERE cust_id=&#39;100000003&#39;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;To delete data is even easier, using the DELETE clause. Fun4all moved and isn&#39;t buying from us ever again, that loser. Let&#39;s take him out of our database.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;DELETE FROM customers&lt;br /&gt;WHERE cust_id = &#39;100000003&#39;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here again we must be careful to use the WHERE clause, or we just erased our whole customer base. Not a good move.&lt;br /&gt;&lt;br /&gt;Next time we&#39;ll discuss changing the table itself, and creating new tables.</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/1442435862590541460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/1442435862590541460?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/1442435862590541460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/1442435862590541460'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/02/changing-and-deleting-data.html' title='SQL Basics - Changing and Deleting Data'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-9195895862356135069</id><published>2008-02-04T00:55:00.001-05:00</published><updated>2008-02-04T00:55:23.212-05:00</updated><title type='text'>SQL Basics - Inserting Data into a Database</title><content type='html'>&lt;p&gt;Up until now, we dealt with retrieving data. Now we&#39;re going to discuss inserting and updating the database data. If we just want to add a record to the table, we use the INSERT clause, or INSERT INTO. There are basically two syntaxes that can be used. I will describe both ways.&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;INSERT INTO Products     &lt;br /&gt;VALUES (&#39;BNBG04&#39;,&#39;DLL01&#39;,&#39;Monkey bean bag toy&#39;,4.49,&#39;Cute monkey toy that your kids will love&#39;)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This will add a full new record to our Products table. When using this simple format, you must specify a value for all columns in the table. If you don&#39;t have a value to enter, you must enter it as NULL.&lt;/p&gt;  &lt;p&gt;There is another format that you can use, and it is more recommended, although a bit more tedious.&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;INSERT INTO Products(prod_id,vend_id,prod_name,prod_price,prod_desc)     &lt;br /&gt;VALUES (&#39;BNBG05&#39;,&#39;DLL01&#39;,&#39;Monkey bean bag toy&#39;,4.49,&#39;Cute monkey toy that your kids will love&#39;)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Times New Roman&quot;&gt;The difference here is that we provided the column names that we are inserting to. This is recommended because then the values don&#39;t have to be in the order of the columns in the table, so if the table changes a bit, the insert will still work correctly. Also, if we explicitly state the column names, we can leave out some columns if we have no info for those columns. For example, if we don&#39;t have a product description we just leave it out of the column list and the values list.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Times New Roman&quot;&gt;There is another useful way to use INSERT INTO, and that is together with a SELECT clause. It automatically inserts the data retrieved from a SELECT query. Here&#39;s an example. We have products in another table names otherProducts and we would like to import it into our Products table. Here&#39;s how it&#39;s done&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;INSERT INTO &lt;/font&gt;&lt;font face=&quot;courier&quot;&gt;Products&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;(&lt;/font&gt;&lt;font face=&quot;courier&quot;&gt;prod_id,vend_id,prod_name,prod_price,prod_desc)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;SELECT(prod_id,vend_id,prod_name,prod_price,prod_desc)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;FROM otherProducts&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;&lt;font face=&quot;Times New Roman&quot;&gt;One more thing for this lesson. If we want to copy results of a query into a brand new table, we use SELECT INTO. For example, to create a table with all products below $7.00, we would do this:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;SELECT * &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;INTO newtable &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;FROM Products&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;WHERE prod_price&amp;lt;7.00&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Times New Roman&quot;&gt;And get this:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://lh5.google.com/abigoldenberg/R6aoxeXdSOI/AAAAAAAAAPc/JX75ykRIxNI/selectinto%5B3%5D&quot;&gt;&lt;img style=&quot;border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px&quot; height=&quot;165&quot; alt=&quot;selectinto&quot; src=&quot;http://lh5.google.com/abigoldenberg/R6aoyeXdSPI/AAAAAAAAAPk/0eh_ZDI4G-M/selectinto_thumb%5B1%5D&quot; width=&quot;438&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;&lt;font face=&quot;Times New Roman&quot;&gt;&lt;/font&gt;      &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Times New Roman&quot;&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/9195895862356135069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/9195895862356135069?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/9195895862356135069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/9195895862356135069'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/02/sql-basics-inserting-data-into-database.html' title='SQL Basics - Inserting Data into a Database'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-2591302598629416340</id><published>2008-02-03T01:41:00.001-05:00</published><updated>2008-02-03T13:57:42.362-05:00</updated><title type='text'>SQL Basics - Combining Queries Using UNION</title><content type='html'>Many times you have two queries that you want to make, but you want the results all in one table. You can do it with the OR function in the WHERE clause, but you can also use unions. Why not just use OR? Well, if you are retrieving the data from two different tables containing similar data, such as sales from two different years. You can&#39;t use joins, because there are no connecting columns. What do you do now? Use Unions. It&#39;s very simple. You take your 2 SQL queries, or 10 SQL queries and put the word UNION in between. Such as.:&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT prod_name, vend_id&lt;br /&gt;FROM Products&lt;br /&gt;WHERE vend_id=&#39;DLL01&#39;&lt;br /&gt;UNION&lt;br /&gt;SELECT prod_name, vend_id&lt;br /&gt;FROM Products&lt;br /&gt;WHERE vend_id=&#39;BRS01&#39;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;http://lh3.google.com/abigoldenberg/R6Vh_OXdSKI/AAAAAAAAAO8/5rpb0iCbVq4/union1%5B2%5D&quot;&gt;&lt;img style=&quot;BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px&quot; height=&quot;151&quot; alt=&quot;union1&quot; src=&quot;http://lh6.google.com/abigoldenberg/R6Vh_-XdSLI/AAAAAAAAAPE/XKN-_X5I_do/union1_thumb&quot; width=&quot;233&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;As stated above, you can connect two different tables, even if they don&#39;t contain the same columns. For example:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT prod_name, vend_id FROM Products WHERE vend_id=&#39;DLL01&#39;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;UNION&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT cust_name, cust_address FROM Customers&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;ORDER BY 1&lt;/span&gt;&lt;/p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSBY6rJFuwNLJ3bTSN5ByO4udFWkMrVHxoU52z9Mne1Z-sN1mzXUmZmgWAp0yGHqBBRYfkK8-xk7ifM5E-VMKzp-yJUTEDDJY9Yl5yvv_9yVgqqVydqC9aIOu2fOMXUBFP9rda0Jg6ha1d/s1600-h/UNION2.JPG&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMx3VKfjp9-EBXk8Ypsr_3ak0ATAoNIMWUwoLSaD_cZM1VaxbkbbKda-XIUeB_1lDxIKJhFuT3uZisHip-x2TqIuJ1KGUcQj703p6WuicFhz58KSyhCAQhrho83QuBLNsJ63O-W9eRmJlx/s1600-h/UNION2.JPG&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5162642971020839122&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMx3VKfjp9-EBXk8Ypsr_3ak0ATAoNIMWUwoLSaD_cZM1VaxbkbbKda-XIUeB_1lDxIKJhFuT3uZisHip-x2TqIuJ1KGUcQj703p6WuicFhz58KSyhCAQhrho83QuBLNsJ63O-W9eRmJlx/s320/UNION2.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;Now why you want to do what I just did is beyond me, but at least you see it works.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;BEWARE OF THE RULES INVOLVED:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;1. All the queries must contain the same number of columns for the output, or you&#39;ll set an error message.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;2. The columns that are part of the UNION must be of similar datatype, such as both test, both number, both numeric, etc. (this is what is exploited in SQL injection to get nice error messages.)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The UNION operator automatically filters out duplicate entries. How about if you had one table containing orders from 2007 and one from 2008 and you filtered by name. The duplicate order would be filtered out, which is not acceptable. For this we use UNION ALL. It is used the same way as UNION, and it returns all entries including duplicates.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;See you next time.&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/2591302598629416340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/2591302598629416340?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/2591302598629416340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/2591302598629416340'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/02/sql-basics-combining-queries-using.html' title='SQL Basics - Combining Queries Using UNION'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMx3VKfjp9-EBXk8Ypsr_3ak0ATAoNIMWUwoLSaD_cZM1VaxbkbbKda-XIUeB_1lDxIKJhFuT3uZisHip-x2TqIuJ1KGUcQj703p6WuicFhz58KSyhCAQhrho83QuBLNsJ63O-W9eRmJlx/s72-c/UNION2.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-2832552961848391202</id><published>2008-02-03T00:34:00.001-05:00</published><updated>2008-02-03T00:35:14.574-05:00</updated><title type='text'>SQL Basics - Using Joins</title><content type='html'>&lt;p&gt;What are joins? We explain in last post (Subqueries) what relational databases are. Basically, there are many different groups of data stored in many different tables. We used subqueries to filter data based on multiple tables. Now what if we need to retrieve data from multiple tables. Well, we can do many select squeries with many subqueries and add them all together. But there must be an easier way. That is what we use joins for. What joins do is virtually connect all the tables based on the columns that connect them, so that for our application we treat it as one big table.&lt;/p&gt;&lt;p&gt;Creating a join is very similar to what we&#39;ve been doing up until now. Two things change. In the FROM clause, we put in all the table names that we&#39;re using. Second, we must match the columns with a WHERE statement. For example:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;font-size:85%;&quot;&gt;SELECT OrderItems.order_num,&lt;/span&gt;&lt;span style=&quot;font-family:Courier;font-size:85%;&quot;&gt;OrderItems.prod_id,Vendors.vend_name&lt;br /&gt;FROM OrderItems,Vendors,Products&lt;br /&gt;Where OrderItems.prod_id=Products.prod_id AND Products.vend_id=Vendors.vend_id;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh6.google.com/abigoldenberg/R6VSV-XdSII/AAAAAAAAAOs/dUmWVg2Ax-U/Join1%5B3%5D&quot;&gt;&lt;img style=&quot;BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px&quot; height=&quot;329&quot; alt=&quot;Join1&quot; src=&quot;http://lh3.google.com/abigoldenberg/R6VSXOXdSJI/AAAAAAAAAO0/fzf-sFe4V5Y/Join1_thumb%5B1%5D&quot; width=&quot;296&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;What we did is use a WHERE clause to join the columns by showing which columns connect them. Then in the FROM clause we included all the tables we&#39;re working with.&lt;/p&gt;&lt;p&gt;You&#39;ll realize something else new here. I have the columns fully qualified, meaning tablename.colname . Being that we&#39;re using multiple tables and they share column names, we must tell the SQL application which column we mean, or you&#39;ll get an error message. Take a look at the example we gave in subqueries. Can you see how much simpler it would be using joins.&lt;/p&gt;&lt;p&gt;To further simplify our job, we can use aliases (which we discussed in a previous post). Using the above example, here&#39;s how we would do it.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT O.order_num,O.prod_id,V.vend_name&lt;br /&gt;FROM OrderItems AS O, Vendors AS V,Products AS P&lt;br /&gt;Where O.prod_id=P.prod_id AND P.vend_id=V.vend_id;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:times;&quot;&gt;We named each column by their initial, and that made life a lot easier, or at least this query easier. There is more to be written about joins, but this will suffice for us. The other types are much more advanced and won&#39;t be used in your regular playing around, especially in SQL injecting. Did you forget that that&#39;s out real goal here?&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/2832552961848391202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/2832552961848391202?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/2832552961848391202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/2832552961848391202'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/02/basic-sql-using-joins.html' title='SQL Basics - Using Joins'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-6823253374609994074</id><published>2008-01-31T23:40:00.001-05:00</published><updated>2008-01-31T23:50:04.938-05:00</updated><title type='text'>SQL Basics - Using Subqueries</title><content type='html'>&lt;p&gt;Most databases use relational tables. What that means is that the data is not stored all in one table. It is split up into various tables. For example , one table would contain customer information, one would contain the order numbers, one would contain the products ordered, and yet another would contain the store products. All the tables are related in some way. The order table would have a column containing the customer that made it, and the order products table would have a column containing the order number it refers to.&lt;/p&gt;&lt;p&gt;To show an example, we&#39;ll use our good old database that we obtained at the beginning of this course. Let&#39;s say you have a recall on the Rabbit bean bag toy. It&#39;s a terrible choking hazard for little children. We now need to send a return envelope to all the customers that purchased it.&lt;/p&gt;&lt;p&gt;These are the steps we need to do.&lt;/p&gt;&lt;p&gt;1. Get the product ID of the rabbit bean bag toy from the Products table.&lt;/p&gt;&lt;p&gt;2. Get the orders that contain that item number from the OrderItems table.&lt;/p&gt;&lt;p&gt;3. Get the customer ID of the companies that made those orders from the Orders table.&lt;/p&gt;&lt;p&gt;4. Get the mailing information of those Customer IDs.&lt;/p&gt;&lt;p&gt;Now here&#39;s how we do it using subqueries, or nested SELECT queries.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;font-size:78%;&quot;&gt;SELECT (RTRIM(cust_name) + &#39;    &#39; + RTRIM(cust_address) + &#39;    &#39; + RTRIM(cust_city) + &#39;, &#39; +RTRIM( cust_state) + &#39; &#39; + RTRIM(cust_zip)) AS &#39;Recall Candidates&#39;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;font-size:78%;&quot;&gt;FROM Customers WHERE cust_id IN &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;font-size:78%;&quot;&gt;(SELECT cust_id FROM Orders WHERE order_num IN&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size:78%;&quot;&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;&lt;span style=&quot;font-family:Courier;font-size:78%;&quot;&gt;    (&lt;/span&gt;&lt;span style=&quot;font-family:Courier;font-size:78%;&quot;&gt;SELECT order_num FROM OrderItems WHERE prod_id=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;font-size:78%;&quot;&gt;        (SELECT prod_id FROM Products WHERE prod_name=&#39;Rabbit bean bag toy&#39;)))&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;If you follow through the SQL code, you will see that we have all those 4 steps nested one in the other. The outcome is below:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh4.google.com/abigoldenberg/R6KizOXdSGI/AAAAAAAAAOc/vq5d92a5BNc/subqueries%5B3%5D&quot;&gt;&lt;img style=&quot;BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px&quot; height=&quot;107&quot; alt=&quot;subqueries&quot; src=&quot;http://lh4.google.com/abigoldenberg/R6Ki1OXdSHI/AAAAAAAAAOk/5nT8RHKIJME/subqueries_thumb%5B1%5D&quot; width=&quot;370&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;We used the RTRIM function to remove some of the spaces contained in the database. We used the AS function to name the outcome, as you can see atop the results table. We also used the IN function to choose multiple returned customers.&lt;/p&gt;&lt;p&gt;Next time we will learn a better way to do this when dealing with so many tables. We&#39;ll learn how to use JOINS. Until next time, keep warm.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/6823253374609994074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/6823253374609994074?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/6823253374609994074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/6823253374609994074'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/sql-basics-using-subqueries.html' title='SQL Basics - Using Subqueries'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-9127642938034889877</id><published>2008-01-31T13:05:00.000-05:00</published><updated>2008-01-31T20:39:06.502-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tutorial"/><title type='text'>SQL Basics - Grouping Data</title><content type='html'>We previously learned now to use aggregate functions to rerieve the average of a column or of entries matching a specific condition filtered with WHERE. Now we will learn how to get all the averages of the table grouped by a column entry. For example, you are a teacher with 20 kids in your class. Each student took six exams and you want ot get each child&#39;s average. You can use AVG() and WHERE student_name=&#39;whatever&#39;, but you would have to do it 20 times for all your students. Here&#39;s where grouping comes into play.&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT AVG(test_score) FROM table_tests&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;GROUP BY student_name&lt;/span&gt;&lt;br /&gt;Another example. Using our old database we&#39;ll get the sum of each order in a separate entry.&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT order_num, SUM(quantity*item_price) FROM OrderItems&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;GROUP BY order_num&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeGKkPl1fqcApAsteVST7nWzIAhhVwomGua1z_uK2NIWb-g6L606h5d4asDsvEqdwtAGOa2B8eIiKtsSN54_D5D_e8fP4ufweXn8mX3sgqoyAucTTRu_HJ4GFjqeaB4SCe_8P-RHd8du_n/s1600-h/group+by.JPG&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5161447247830665298&quot; style=&quot;CURSOR: hand&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeGKkPl1fqcApAsteVST7nWzIAhhVwomGua1z_uK2NIWb-g6L606h5d4asDsvEqdwtAGOa2B8eIiKtsSN54_D5D_e8fP4ufweXn8mX3sgqoyAucTTRu_HJ4GFjqeaB4SCe_8P-RHd8du_n/s320/group+by.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;How about if we want to get a list of all students with an average below 65. We would think to use the WHERE clause, but it won&#39;t work. WHERE filters rows only, not groups. For groups, we use the HAVING clause.&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT AVG(test_score) AS average &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;FROM table_tests&lt;br /&gt;GROUP BY student_name&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;HAVING average &lt;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;One more thing to note. If you were to have all your classes in one table and you wanted the average of all failing students from just your Grade 6 class, here&#39;s how you&#39;ll do it:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT AVG(test_score) AS average&lt;br /&gt;FROM table_tests&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;WHERE column_grade = 6&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;GROUP BY student_name&lt;br /&gt;HAVING average &lt;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;ORDER BY student_name&lt;/span&gt;&lt;br /&gt;Notice I used ORDER BY to sort the data, because although GROUP BY groups the data by name, it will not necessarily be in alphabetical order. Note that the clauses must actually be in the above order. &lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT...FROM...WHERE...GROUP BY...HAVING...ORDER BY&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/9127642938034889877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/9127642938034889877?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/9127642938034889877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/9127642938034889877'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/sql-basics-grouping-data.html' title='SQL Basics - Grouping Data'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeGKkPl1fqcApAsteVST7nWzIAhhVwomGua1z_uK2NIWb-g6L606h5d4asDsvEqdwtAGOa2B8eIiKtsSN54_D5D_e8fP4ufweXn8mX3sgqoyAucTTRu_HJ4GFjqeaB4SCe_8P-RHd8du_n/s72-c/group+by.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-431652586198394045</id><published>2008-01-31T09:57:00.000-05:00</published><updated>2008-01-31T09:58:25.562-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tutorial"/><title type='text'>SQL Basics - Using Functions (cont.)</title><content type='html'>&lt;p&gt;Today we&#39;re going to talk about some more text manipulation functions that are a bit tricky to get right. The reason being that each application has different syntax for these functions. I will post all the different syntaxes for the popular programs and will indicate in a chart which syntax each program uses.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;CONCATENATE&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;We already spoke about Concatenating, but I bring it up because the chart will tell us which syntax your program uses.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;1. SELECT col1 col2 FROM tablename WHERE .....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;2. SELECT col1 + col2 FROM tablename WHERE .....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;3. SELECT CONCAT(col1,col2) FROM tablename WHERE .....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;_________________________________________________&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SUBSTRING&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;This function is similar to the LEFT and RIGHT function we learned about in last lesson. Except it takes a string from in middle of another string. For example, to take the third and fourth letter of the string in the column, we would enter it so:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;1. SELECT SUBSTRING(colname FROM 3 FOR 2) FROM tablename WHERE .....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;2. SELECT SUBSTR(colname,3,2) FROM tablename WHERE .....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;3. SELECT MID(colname,3,2) FROM tablename WHERE .....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;4. SELECT SUBSTRING(colname,3,2)FROM tablename WHERE .....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;_________________________________________________&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;&lt;strong&gt;UPPER CASE&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;To retrieve the results all in upper case format, we use this command:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;1. SELECT UPPER(colname) FROM tablename WHERE .....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;2. SELECT UCase(colname) FROM tablename WHERE .....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;_________________________________________________&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;&lt;strong&gt;LOWER CASE&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;To retrieve the results all in lower case format, we enter it like this:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;1. SELECT LOWER(colname) FROM tablename WHERE .....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;2. SELECT LCase(colname) FROM tablename WHERE .....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;_________________________________________________&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;POSITION OF SUBSTRING IN STRING&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;To retrieve the position of a substring in a string, we use the SUBSTRING function. This is especially useful when finding out where a space is located to retrieve just the first word. To do that, we enter:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;1. SELECT POSITION(&#39; &#39; IN colname) FROM tablename WHERE.....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;2. SELECT INSTR(colname, &#39; &#39;) FROM tablename WHERE.....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;3. SELECT CHARINDEX(&#39; &#39;,colname) FROM tablename WHERE.....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;_________________________________________________&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;There are many more such functions, but these are the most important ones, especially if we&#39;re dealing with SQL injection. The following is a chart of the major Database applications and which syntax they use, using the numbered syntaxes above.&lt;/span&gt;&lt;/p&gt;&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;500&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;85&quot;&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;101&quot;&gt;Concatenate&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;69&quot;&gt;Substring&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;Upper Case&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;88&quot;&gt;Lower Case&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;66&quot;&gt;Position&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;85&quot;&gt;SQLite&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;101&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;72&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;88&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;66&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;84&quot;&gt;DB2&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;101&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;74&quot;&gt;2&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;85&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;88&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;66&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;84&quot;&gt;Access&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;101&quot;&gt;2&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;76&quot;&gt;3&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;85&quot;&gt;2&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;88&quot;&gt;2&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;66&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;PostGres&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;101&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;77&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;85&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;88&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;66&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;Oracle&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;2&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;85&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;88&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;66&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;SQL Server&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;2&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;4&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;85&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;88&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;66&quot;&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;MySQL&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;3&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;85&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;88&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;66&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;Mimer&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;85&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;88&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;66&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;Sybase&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;4&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;85&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;88&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;66&quot;&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;We&#39;ll speak....&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/431652586198394045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/431652586198394045?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/431652586198394045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/431652586198394045'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/sql-basics-using-functions-cont.html' title='SQL Basics - Using Functions (cont.)'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-5230406073353526124</id><published>2008-01-30T23:38:00.000-05:00</published><updated>2008-01-30T23:59:08.454-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tutorial"/><title type='text'>SQL Basics - Using Aggregate Functions</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;AGGREGATE FUNCTIONS&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Aggregate functions are used to summarize values, such as getting the sum of many rows, the average, etc. Let&#39;s go through the most used functions.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;AVERAGE&lt;/strong&gt;&lt;br /&gt;AVG() is used to get the average of a collection of rows.&lt;br /&gt;&lt;br /&gt;Usage: &lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT AVG(colname) FROM ..... [WHERE...]&lt;/span&gt;&lt;br /&gt;_________________________________________&lt;br /&gt;&lt;strong&gt;COUNT&lt;/strong&gt;&lt;br /&gt;COUNT () is used to return the number of rows in a given column or rows that are defined in a WHERE clause.&lt;br /&gt;&lt;br /&gt;Usage: &lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT COUNT(colname) FROM ..... [WHERE...]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;Using the above syntax will return the number of rows that don&#39;t have a NULL value. To return the full number of rows including rows with a NULL value use:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-family:Georgia;&quot;&gt;&lt;/span&gt;SELECT COUNT(*) FROM .....&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;strong&gt;_________________________________________&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:georgia;font-size:130%;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;MAX &lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:georgia;font-size:130%;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;MAX() is used to get the greatest value in the column or defined rows.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:georgia;font-size:130%;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Usage: &lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT MAX(colname) FROM ..... [WHERE...]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:georgia;font-size:130%;&quot;&gt;__________________________________&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;&lt;strong&gt;MIN&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;MIN() returns the lowest value in the column or defined rows.&lt;br /&gt;&lt;br /&gt;Usage: &lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT MAX(colname) FROM ..... [WHERE...]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;_________________________________________&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;&lt;strong&gt;SUM&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;SUM() Returns the sum of the column or the defined rows.&lt;br /&gt;&lt;br /&gt;Usage: &lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT SUM(colname) FROM ..... [WHERE...]&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/5230406073353526124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/5230406073353526124?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/5230406073353526124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/5230406073353526124'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/sql-basics-using-aggregate-functions.html' title='SQL Basics - Using Aggregate Functions'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-7182227918010382981</id><published>2008-01-30T19:54:00.000-05:00</published><updated>2008-01-30T23:59:08.455-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tutorial"/><title type='text'>SQL Basics - Using Functions (Text Manipulation)</title><content type='html'>We really started working with functions in the last post using concatenation. Today we&#39;ll discuss one of two types of functions. The first is string manipulation functions, which concatenation is part of. The second category is the aggregate functions, which summarizes values, such as sums and averages. This second function will be discussed in the next post.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;STRING MANIPULATION FUNCTIONS&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;LTRIM&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This function is used to &lt;span style=&quot;font-family:georgia;&quot;&gt;remove all spaces to the left&lt;/span&gt; of the table entry. For example, if the entry was &#39; hello&#39;, we only want the word &#39;hello to be returned, and to do this we use LTRIM.&lt;br /&gt;&lt;br /&gt;Usage: &lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT LTRIM&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;(colname) From .....&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;________________________________________&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;&lt;strong&gt;RTRIM&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;This function is used to remove all spaces to the right of the table entry. For example, if the entry was &#39;hello &#39;, we only want the word &#39;hello to be returned, and to do this we use RTRIM&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;Usage:&lt;/span&gt; &lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT RTRIM(colname) From .....&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;/span&gt;___________________________________&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;LEFT&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This function is used to return a specified number of characters starting at the left of the table entry. This is useful if a column of Zip Codes are saved in 00000-0000 (for you USA&#39;ers) format and we only want the first five digits. For this we use LEFT&lt;br /&gt;&lt;br /&gt;Usage: &lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT LEFT(colname,5) From .....&lt;/span&gt;&lt;br /&gt;___________________________________&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;RIGHT&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This function is used to return a specified number of characters starting at the right of the table entry. If we wanted to get the last 4 digits of a Social Security number (also for you USA&#39;ers), you would use the RIGHT function.&lt;br /&gt;Usage:&lt;span style=&quot;font-family:courier new;&quot;&gt; SELECT RIGHT(colname,4) From .....&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;/span&gt;___________________________________&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;LEN&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This function simply gets the length of the specified entry. For example, to get the lenght of a user&#39;s password, we use LEN.&lt;br /&gt;Usage: &lt;span style=&quot;font-family:courier new;&quot;&gt;SELECT LEN(pass_word) From .....&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/7182227918010382981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/7182227918010382981?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/7182227918010382981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/7182227918010382981'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/sql-basics-using-functions-text.html' title='SQL Basics - Using Functions (Text Manipulation)'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-4071205839405187529</id><published>2008-01-30T15:47:00.001-05:00</published><updated>2008-01-30T23:59:08.456-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tutorial"/><title type='text'>SQL Basics - Sorting Your Results</title><content type='html'>&lt;p&gt;To sort your results returned from a SELECT command,we use the ORDER BY clause. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt; &lt;/p&gt;&lt;p&gt;&lt;strong&gt;SYNTAX&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;SELECT * FROM table_name [WHERE condition]&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;ORDER BY column-name(s)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;&lt;strong&gt;EXAMPLES&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT * FROM TeethEyes &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;ORDER BY child_age&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh5.google.com/abigoldenberg/R5_46OXdRzI/AAAAAAAAAME/Cl3X26TQ8Jo/orderby13&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;95&quot; alt=&quot;order by 1&quot; src=&quot;http://lh5.google.com/abigoldenberg/R5_47OXdR0I/AAAAAAAAAMM/OeEmCBOAI5g/orderby1_thumb1&quot; width=&quot;380&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;You can also sort text in alphabetical order.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT * FROM TeethEyes &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;ORDER BY child_Eyes&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;http://lh4.google.com/abigoldenberg/R5_47-XdR1I/AAAAAAAAAMU/OvMkTZRCEJw/orderby23&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;99&quot; alt=&quot;order by 2&quot; src=&quot;http://lh6.google.com/abigoldenberg/R5_48eXdR2I/AAAAAAAAAMc/eYz0Yfgy1fQ/orderby2_thumb1&quot; width=&quot;389&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;How about if you want to sort in a descending order, such as the older child first. You use the DESC parameter.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT * FROM TeethEyes &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;ORDER BY child_age DESC &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh3.google.com/abigoldenberg/R5_4_uXdR3I/AAAAAAAAAMk/Jbe9wm8OQXM/orderby33&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;101&quot; alt=&quot;order by 3&quot; src=&quot;http://lh5.google.com/abigoldenberg/R5_5AOXdR4I/AAAAAAAAAMs/pfCdwgf9T1w/orderby3_thumb1&quot; width=&quot;397&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;One last thing. You can sort by multiple columns, and have it sort first by one and then the other, for example:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT * FROM TeethEyes WHERE child_teeth&amp;gt;3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;ORDER BY child_eyes, child_age DESC&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh5.google.com/abigoldenberg/R5_5BOXdR5I/AAAAAAAAAM0/2ptv8bpH0PM/orderby43&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;90&quot; alt=&quot;order by 4&quot; src=&quot;http://lh6.google.com/abigoldenberg/R5_5CeXdR6I/AAAAAAAAAM8/UK8zMDAl3Bg/orderby4_thumb1&quot; width=&quot;407&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;First it sorted by the eye color in ascending order, then it sort by age in descending order.&lt;/p&gt;&lt;p&gt;We&#39;ll be in touch.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/4071205839405187529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/4071205839405187529?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/4071205839405187529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/4071205839405187529'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/sql-basics-sorting-your-results.html' title='SQL Basics - Sorting Your Results'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-837500456716632928</id><published>2008-01-30T09:00:00.000-05:00</published><updated>2008-01-30T23:59:08.457-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tutorial"/><title type='text'>SQL Basics - Using Wildcards With The LIKE Operator</title><content type='html'>&lt;p&gt;If you&#39;ve worked with computers you know about wildcards. In Windows &#39;*&#39; stands for an indefinite number of characters and &#39;?&#39; means one character. You can do a similar representation in SQL WHERE statements. In most SQL applications the &#39;*&#39; is replaced with &#39;%&#39; and the &#39;?&#39; is replaced by the &#39;_&#39; (underscore) symbol. In Microsoft Access you must use the standard wildcards, * and ?. The way we use it is with the LIKE operator:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT * FROM column_name WHERE LIKE &#39;__sample*&#39;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:times new roman;&quot;&gt;What the above example does is find entries in column_name that have any two characters, then the word &#39;sample&#39;, then whatever else.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Here are some examples of the syntax:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT child_name FROM TeethEyes&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;WHERE child_name LIKE &#39;__rr%&#39;;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh5.google.com/abigoldenberg/R5_42OXdRvI/AAAAAAAAALk/-HQ53xaHEcg/LIKE12&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;77&quot; alt=&quot;LIKE 1&quot; src=&quot;http://lh3.google.com/abigoldenberg/R5_42uXdRwI/AAAAAAAAALs/A2zn192-Pkg/LIKE1_thumb&quot; width=&quot;119&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;In Access you would type: &lt;span style=&quot;font-family:courier;&quot;&gt;WHERE LIKE &#39;??rr*&#39;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;Here&#39;s another example:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT child_name FROM TeethEyes&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;WHERE child_name LIKE &#39;%y&#39;;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;&lt;a href=&quot;http://lh5.google.com/abigoldenberg/R5_43OXdRxI/AAAAAAAAAL0/A6bZ6PQKIMg/Like22&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;96&quot; alt=&quot;Like 2&quot; src=&quot;http://lh3.google.com/abigoldenberg/R5_43uXdRyI/AAAAAAAAAL8/TsneU_Pgw9c/Like2_thumb&quot; width=&quot;120&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;IMPORTANT NOTE: I think I failed to mention all along the difference when entering text strings or entering numbers. When entering text in the WHERE clause, the text is surrounded by &#39;s. such as &#39;this&#39;. Numbers are entered without the apostrophes. I&#39;ll edit the first WHERE post to note this there too.&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/837500456716632928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/837500456716632928?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/837500456716632928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/837500456716632928'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/sql-basics-like-operator-and-order-by.html' title='SQL Basics - Using Wildcards With The LIKE Operator'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-1751758955770851713</id><published>2008-01-29T23:13:00.001-05:00</published><updated>2008-01-30T23:59:08.458-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tutorial"/><title type='text'>SQL Basics - Calculated Fields and Aliases</title><content type='html'>&lt;p&gt;Very often you will find that you need to display data not in it&#39;s original form. Such as totals, averages, or multiples, or just reformatted. We can usually do it with the application we&#39;re using, but it is more efficient to do it using SQL. What happens is that SQL creates a virtual column containing your calculated field.&lt;/p&gt;  &lt;p&gt;Here are some of the most used operators.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;CONCATENATION&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This operator takes two or more strings&amp;#160; and connects them into one long string. For this we use the &#39;+&#39; symbol in MS Access and some others. In some programs &#39;||&#39; is used (two straight up lines.)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;EXAMPLE&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;SELECT child_name + child_eyes FROM TeethEyes;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Courier&quot;&gt;&lt;a href=&quot;http://lh5.google.com/abigoldenberg/R5_5OOXdR7I/AAAAAAAAANE/NFqPuNtP0z8/concat12&quot;&gt;&lt;img style=&quot;border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;114&quot; alt=&quot;concat1&quot; src=&quot;http://lh3.google.com/abigoldenberg/R5_5OuXdR8I/AAAAAAAAANM/0dHMPT_65YM/concat1_thumb&quot; width=&quot;120&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Times New Roman&quot;&gt;Not extremely readable, is it? Here&#39;s what we can do to help that&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;SELECT child_name + &#39; has &#39; + child_eyes + &#39; eyes.&#39; FROM TeethEyes;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Courier&quot;&gt;&lt;a href=&quot;http://lh4.google.com/abigoldenberg/R5_5P-XdR9I/AAAAAAAAANU/zdxhXgZ10xM/concat22&quot;&gt;&lt;img style=&quot;border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;113&quot; alt=&quot;concat2&quot; src=&quot;http://lh3.google.com/abigoldenberg/R5_5QuXdR-I/AAAAAAAAANc/c7IbpYWtFIw/concat2_thumb&quot; width=&quot;166&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Times New Roman&quot;&gt;That&#39;s a little better.What we did is add the name, &#39; has &#39;, which is a space, the word has ans a space. Then we added the eye color, a space and eyes. Pretty simple.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Times New Roman&quot;&gt;&lt;strong&gt;MATHEMATICAL FORMATTING&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Times New Roman&quot;&gt;You can also use the &#39;+&#39; symbol on numbers to add them together. For that matter, you can use all 4 regular operators (+,-,*,/).&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Times New Roman&quot;&gt;&lt;strong&gt;EXAMPLE&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;SELECT (quantity*item_price) FROM OrderItems WHERE order_num=20005&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Courier&quot;&gt;&lt;a href=&quot;http://lh4.google.com/abigoldenberg/R5_5Q-XdR_I/AAAAAAAAANk/FmBFMm9_PSU/sum12&quot;&gt;&lt;img style=&quot;border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;78&quot; alt=&quot;sum1&quot; src=&quot;http://lh4.google.com/abigoldenberg/R5_5R-XdSAI/AAAAAAAAANs/fuOIFVLIXhk/sum1_thumb&quot; width=&quot;169&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Times New Roman&quot;&gt;That&#39;s the number of items ordered multiplied by the price of the items, for order number 20005. If we want to get the total price for the order we would have to use SUM(), which we&#39;ll hopefully learn more about in another lesson.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;SELECT SUM(quantity*item_price) FROM OrderItems WHERE order_num=20005&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://lh3.google.com/abigoldenberg/R5_5SuXdSBI/AAAAAAAAAN0/ZQ4ZIpemv6s/sum22&quot;&gt;&lt;img style=&quot;border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;40&quot; alt=&quot;sum2&quot; src=&quot;http://lh5.google.com/abigoldenberg/R5_5TOXdSCI/AAAAAAAAAN8/UbqhGcXzghA/sum2_thumb&quot; width=&quot;168&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If you noticed, the column name in the past few pictures was Expr1000. That&#39;s the name automatically given to the virtual column by SQL. Sometimes we need to name the column so that our application can work with it. For this we use aliases, by adding the AS parameter.&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;courier&quot;&gt;SELECT SUM(quantity*item_price) &lt;strong&gt;AS order_total&lt;/strong&gt; FROM OrderItems WHERE order_num=20005&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://lh3.google.com/abigoldenberg/R5_5TuXdSDI/AAAAAAAAAOE/mC3YsECxa3c/sum32&quot;&gt;&lt;img style=&quot;border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px&quot; height=&quot;41&quot; alt=&quot;sum3&quot; src=&quot;http://lh4.google.com/abigoldenberg/R5_5T-XdSEI/AAAAAAAAAOM/_PoSfEZ081I/sum3_thumb&quot; width=&quot;120&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Times New Roman&quot;&gt;As you see, now our virtual column has a name order_total, and as far as our application knows, it&#39;s a regular real column to work with.&lt;/font&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/1751758955770851713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/1751758955770851713?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/1751758955770851713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/1751758955770851713'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/sql-basics-calculated-fields-and.html' title='SQL Basics - Calculated Fields and Aliases'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-4177029959065073533</id><published>2008-01-29T20:54:00.000-05:00</published><updated>2008-01-29T20:56:28.886-05:00</updated><title type='text'>Sorry for the mess up</title><content type='html'>For a few hours today this blog was a mess. It was due to a tag I added to try to make it neater, and it went haywire, especially if you were using Mozilla. It&#39;s fixed and running as good as ever. Sorry again to all my readers.</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/4177029959065073533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/4177029959065073533?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/4177029959065073533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/4177029959065073533'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/sorry-for-mess-up.html' title='Sorry for the mess up'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-16666248831153262</id><published>2008-01-29T15:28:00.001-05:00</published><updated>2008-01-30T23:59:08.458-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tutorial"/><title type='text'>SQL Basics - The WHERE Clause (AND OR and IN)</title><content type='html'>&lt;p&gt;&lt;strong&gt;CHECKING FOR MULTIPLE CONDITIONS&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;In last lesson we learned about the WHERE clause used to filter the results. How about if you wanted to filter the results further so that the output matches in two aspects. For this we use the AND operator. For example:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT prod_name FROM Products&lt;br /&gt;WHERE vend_id=&#39;BRS01&#39; AND prod_price&amp;lt;9;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;This returns:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh4.google.com/abigoldenberg/R5-MR-XdRhI/AAAAAAAAAJ0/wIX7cT-4iKI/resultsand2&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;78&quot; alt=&quot;results and&quot; src=&quot;http://lh5.google.com/abigoldenberg/R5-MSOXdRiI/AAAAAAAAAJ8/EItGE8L59vM/resultsand_thumb&quot; width=&quot;217&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;It returned only the name of the products that are from vendor BRS01 and that are priced under $9.00.&lt;/p&gt;&lt;p&gt;___________________________________________________&lt;/p&gt;&lt;p&gt;&lt;strong&gt;CHECKING FOR ONE OF MULTIPLE CONDITIONS&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Now if we wanted to retrieve items that match one of various conditions, we would use the OR operator, like this:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT * FROM OrderItems&lt;br /&gt;WHERE quantity&amp;gt;50 OR item_price&amp;gt;10;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;Here&#39;s what you get:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh5.google.com/abigoldenberg/R5-MTOXdRjI/AAAAAAAAAKE/WtaacoQLy8A/returnor4&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;232&quot; alt=&quot;return or&quot; src=&quot;http://lh6.google.com/abigoldenberg/R5-MUeXdRkI/AAAAAAAAAKM/bDCE44dj6g0/returnor_thumb2&quot; width=&quot;462&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;You can also use both AND and OR together. The AND will get processed first, and the OR second, so to use the OR first use parentheses, as shown below.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT * FROM TeethEyes WHERE child_age&amp;lt;6 AND child_eyes=&#39;Gray&#39; OR child_eyes=&#39;Brown&#39;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh6.google.com/abigoldenberg/R5-MVeXdRlI/AAAAAAAAAKU/GtI9ghwzbh4/andornop3&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;97&quot; alt=&quot;andorno p&quot; src=&quot;http://lh4.google.com/abigoldenberg/R5-MV-XdRmI/AAAAAAAAAKc/HM52vlozUTY/andornop_thumb1&quot; width=&quot;448&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT * FROM TeethEyes WHERE child_age&amp;lt;6 AND (child_eyes=&#39;Gray&#39; OR child_eyes=&#39;Brown&#39;)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh6.google.com/abigoldenberg/R5-MWeXdRnI/AAAAAAAAAKk/y9UJ0LqiKOU/andorp8&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;116&quot; alt=&quot;andor p&quot; src=&quot;http://lh5.google.com/abigoldenberg/R5-MXOXdRoI/AAAAAAAAAKs/h9vC2S57ucw/andorp_thumb6&quot; width=&quot;463&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;In the first case we didn&#39;t use parentheses. It returned all entries that match either a child under 6 with brown eyes, or a child with gray eyes. In the second case, it returned children under 6 that have either Gray or Brown eyes.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;___________________________________________________&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;A similar operator is the IN operator. It works almost the same as OR, with a different syntax.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT * FROM TeethEyes&lt;br /&gt;WHERE child_age IN(8,1,10)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh3.google.com/abigoldenberg/R5-MXuXdRpI/AAAAAAAAAK0/ew1LXR2LWlI/INoperator3&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;98&quot; alt=&quot;IN operator&quot; src=&quot;http://lh6.google.com/abigoldenberg/R5-MYeXdRqI/AAAAAAAAAK8/fJD5G7AFKYI/INoperator_thumb1&quot; width=&quot;452&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;___________________________________________________&lt;/p&gt;&lt;p&gt;Before we close out for the day, I&#39;ll mention two more operators, NOT and IS NULL. NOT works almost the same as&#39;&amp;lt;&amp;gt;&#39;, only it comes before the column name.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;SELECT vend_name,vend_country FROM Vendors&lt;br /&gt;WHERE NOT vend_country=&#39;USA&#39;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh4.google.com/abigoldenberg/R5-MY-XdRrI/AAAAAAAAALE/86jZHpQqoVs/NOT2&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;78&quot; alt=&quot;NOT&quot; src=&quot;http://lh6.google.com/abigoldenberg/R5-MZeXdRsI/AAAAAAAAALM/m2qF_jw7A8s/NOT_thumb&quot; width=&quot;216&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;IS NULL checks for a NULL value in the given column. In our Vendors table, foreign companies don&#39;t have states listed so this is the result.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT vend_name,vend_country FROM Vendors&lt;br /&gt;WHERE vend_state IS NULL&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh4.google.com/abigoldenberg/R5-MZ-XdRtI/AAAAAAAAALU/9o-UZ2hDL0M/NOT5&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;78&quot; alt=&quot;NOT&quot; src=&quot;http://lh6.google.com/abigoldenberg/R5-MaeXdRuI/AAAAAAAAALc/bfR54LR97nY/NOT_thumb1&quot; width=&quot;216&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/16666248831153262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/16666248831153262?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/16666248831153262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/16666248831153262'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/learning-basic-of-sql-part-three-where.html' title='SQL Basics - The WHERE Clause (AND OR and IN)'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-2376619492714671126</id><published>2008-01-28T20:22:00.001-05:00</published><updated>2008-01-30T23:59:08.459-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tutorial"/><title type='text'>SQL Basics - The WHERE Clause</title><content type='html'>&lt;style type=&quot;text/css&quot;&gt;.nobrtable br { display: none }&lt;/style&gt;&lt;br /&gt;&lt;p&gt;The WHERE clause is used to filter through the table and extract only the rows you want.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;BASIC SYNTAX&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div class=&quot;nobrtable&quot;&gt;&lt;table cellspacing=&quot;0&quot; width=&quot;80%&quot; bgcolor=&quot;#ffffcc&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;SELECT column FROM table&lt;/pre&gt;&lt;pre&gt;WHERE column operator value&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;EXPLANATION&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You already know what SELECT and FROM is, the new part is:&lt;/p&gt;&lt;p&gt;WHERE column operator value&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;What WHERE does is tell the SELECT Statement to only select the entries from the table that match a certain criteria. Let&#39;s give an example and then we&#39;ll explain it a bit more. Using our database we&#39;ll issue the following command&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT prod_id, prod_name FROM Products&lt;br /&gt;WHERE vend_id=&#39;BRS01&#39;;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;The output is shown below:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh5.google.com/abigoldenberg/R55_ieXdRZI/AAAAAAAAAI0/dBBZeR5ARaI/outputwhere12&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;90&quot; alt=&quot;output where 1&quot; src=&quot;http://lh6.google.com/abigoldenberg/R55_juXdRaI/AAAAAAAAAI8/kERudqo2PiY/outputwhere1_thumb&quot; width=&quot;244&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;What&#39;d we do? We selected the product ID and product name of the products whose vendor code is BRS01&lt;span style=&quot;font-family:georgia;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;So &lt;span style=&quot;font-family:courier;&quot;&gt;WHERE column operator value&lt;/span&gt; means we write WHERE, the name of the column to check or &#39;vend_id&#39;, the operator which in our case was &#39;=&#39;, and the value which was BRS01.&lt;/p&gt;&lt;p&gt;This is a list of the basic operators, although we will learn other ones in the future.&lt;/p&gt;&lt;div class=&quot;nobrtable&quot;&gt;&lt;table cellspacing=&quot;0&quot; width=&quot;60%&quot; bgcolor=&quot;#ffffcc&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td valign=&quot;top&quot;&gt;&lt;b&gt;Operator&lt;/b&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;td&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td valign=&quot;top&quot;&gt;=&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;td&gt;Equal&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td valign=&quot;top&quot;&gt;&amp;lt;&amp;gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;td&gt;Not equal&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td valign=&quot;top&quot;&gt;&amp;gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;td&gt;Greater than&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td valign=&quot;top&quot;&gt;&amp;lt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;td&gt;Less than&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td valign=&quot;top&quot;&gt;&amp;gt;=&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;td&gt;Greater than or equal&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td valign=&quot;top&quot;&gt;&amp;lt;=&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;td&gt;Less than or equal&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td valign=&quot;top&quot;&gt;BETWEEN&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;td&gt;Between an inclusive range&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Here&#39;s some examples of these operators using the table &#39;TeethEyes&#39;, shown below:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh3.google.com/abigoldenberg/R55_k-XdRbI/AAAAAAAAAJE/I2DNVQ6em2k/childeyes4&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;102&quot; alt=&quot;childeyes&quot; src=&quot;http://lh6.google.com/abigoldenberg/R55_luXdRcI/AAAAAAAAAJM/5P_92Tpx_BQ/childeyes_thumb2&quot; width=&quot;378&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT child_name, child_age FROM TeethEyes&lt;br /&gt;WHERE child_teeth&amp;gt;18;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;returns: &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh4.google.com/abigoldenberg/R55_nOXdRdI/AAAAAAAAAJU/zPI3_exez3Q/greater2&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;79&quot; alt=&quot;greater&quot; src=&quot;http://lh3.google.com/abigoldenberg/R55_p-XdReI/AAAAAAAAAJc/BXyNXsYVIbo/greater_thumb&quot; width=&quot;218&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT child_name FROM TeethEyes&lt;br /&gt;WHERE child_age&amp;lt;=8;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;returns:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;Harry&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;Barry&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;Kari&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;And finally, &lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT child_name,child_teeth,child_eyes FROM TeethEyes WHERE child_age BETWEEN 4 AND 9;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;returns:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh5.google.com/abigoldenberg/R55_reXdRfI/AAAAAAAAAJk/4O6VNOl8Fco/between2&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;64&quot; alt=&quot;between&quot; src=&quot;http://lh5.google.com/abigoldenberg/R55_veXdRgI/AAAAAAAAAJs/PJQShI6XZdc/between_thumb&quot; width=&quot;244&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;The WHERE statement is almost always used, and will be used extensively in SQL injection. Make sure you&#39;ve got it so far.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/2376619492714671126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/2376619492714671126?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/2376619492714671126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/2376619492714671126'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/learning-basics-of-sql-part-two-where.html' title='SQL Basics - The WHERE Clause'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-7249136034239186083</id><published>2008-01-28T12:57:00.001-05:00</published><updated>2008-01-30T23:59:08.459-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tutorial"/><title type='text'>Opening Database and Sending Queries</title><content type='html'>&lt;p&gt;Here are the instructions on how to set up you&#39;re own practice range for SQL learning. I am going to write the instructions using Microsoft Access, because that is what I am using. You may want to use something else, especially if you&#39;re using Linux. There is a free Java based SQL client called Aqua Data Studio. It can be downloaded at &lt;a href=&quot;http://www.aquafold.com/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color:#0000ff;&quot;&gt;http://www.aquafold.com/&lt;/span&gt;&lt;/a&gt;. If you go with that option, read up on their website about how to get started.&lt;/p&gt;&lt;p&gt;If you are using Microsoft Access, then read on:&lt;/p&gt;&lt;p&gt;You should already have the database downloaded from 2 posts ago, or find any other MS Access database online to use as a practice DB.&lt;/p&gt;&lt;p&gt;1. Click on the .mdb file you downloaded to open MS Access and the database. It will open with a smaller window inside that look like this:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh4.google.com/abigoldenberg/R54XQOXdRRI/AAAAAAAAAHo/opr5eu5wHxI/accessscreen8&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;176&quot; alt=&quot;accessscreen&quot; src=&quot;http://lh6.google.com/abigoldenberg/R54XWuXdRSI/AAAAAAAAAHw/5ljNeP4eq9Y/accessscreen_thumb4&quot; width=&quot;244&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;Select &#39;Queries&#39; from the side menu. Then click on &#39;New&#39; from the top menu. In the &#39;New Query&#39; popup, select &#39;New Design&#39; and press OK. In the next popup, &#39;Show Table&#39;, press &#39;Close&#39;.&lt;/p&gt;&lt;p&gt;Go to the &#39;View&#39; menu on top, and select &#39;SQL View&#39;.&lt;/p&gt;&lt;p&gt; &lt;a href=&quot;http://lh4.google.com/abigoldenberg/R54XZOXdRTI/AAAAAAAAAH4/suHpWIWI5yg/viewmenu4&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;323&quot; alt=&quot;view menu&quot; src=&quot;http://lh5.google.com/abigoldenberg/R54XaeXdRUI/AAAAAAAAAIA/Fx8igRWzh_c/viewmenu_thumb2&quot; width=&quot;331&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the window that opens is where you&#39;ll be doing you&#39;re magic. Access already puts in the SELECT statement because that is usually what you&#39;ll be using. When you finish typing your SQL query, you&#39;ll press the red exclamation mark on top to run it.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh6.google.com/abigoldenberg/R54XbuXdRVI/AAAAAAAAAII/A1NuYUMyMYo/runbutton3&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;235&quot; alt=&quot;run button&quot; src=&quot;http://lh4.google.com/abigoldenberg/R54XdOXdRWI/AAAAAAAAAIQ/oHMdzSxfwTk/runbutton_thumb1&quot; width=&quot;321&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;The output will be displayed in a new window. To go back to your SQL query, you&#39;ll choose SQL View again from the &#39;View&#39; menu.&lt;/p&gt;&lt;p&gt;Now that you have the battleground ready, let&#39;s get going.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/7249136034239186083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/7249136034239186083?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/7249136034239186083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/7249136034239186083'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/opening-database-and-sending-queries.html' title='Opening Database and Sending Queries'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-6884863212891823079</id><published>2008-01-27T23:17:00.001-05:00</published><updated>2008-01-30T23:59:08.460-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tutorial"/><title type='text'>Learning the Basics of SQL - Part One - The SELECT Statement</title><content type='html'>&lt;p&gt;Let&#39;s get straight down to business.&lt;/p&gt;&lt;p&gt;We&#39;ll start with the most often used statement:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;THE SELECT STATEMENT:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Basic syntax:&lt;/p&gt;&lt;table cellspacing=&quot;0&quot; width=&quot;80%&quot; bgcolor=&quot;#ffffcc&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;SELECT column_name(s)&lt;br /&gt;FROM table_name&lt;/pre&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;--------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;For example (using the table Products in the previous post):&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh3.google.com/abigoldenberg/R51XPOXdRLI/AAAAAAAAAGY/lmqHpmiKYbY/partialprod%5B8%5D&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;194&quot; alt=&quot;partialprod&quot; src=&quot;http://lh4.google.com/abigoldenberg/R51XQeXdRMI/AAAAAAAAAGg/qFxhKnaRRwk/partialprod_thumb%5B4%5D&quot; width=&quot;466&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;style type=&quot;text/css&quot;&gt;.nobrtable br { display: none }&lt;/style&gt;&lt;br /&gt;&lt;div class=&quot;nobrtable&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;table cellspacing=&quot;0&quot; width=&quot;80%&quot; bgcolor=&quot;#ffffcc&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;pre&gt;SELECT prod_name&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;FROM Products&lt;/pre&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;Will return : &lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh5.google.com/abigoldenberg/R51XRuXdRNI/AAAAAAAAAGo/FZETuNmctpg/prodresults%5B2%5D&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;205&quot; alt=&quot;prodresults&quot; src=&quot;http://lh3.google.com/abigoldenberg/R51XSOXdROI/AAAAAAAAAGw/f5kpiN5-PuU/prodresults_thumb&quot; width=&quot;175&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;--------------------------------------&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Or we can retrieve multiple columns such as:&lt;/p&gt;&lt;style type=&quot;text/css&quot;&gt;.nobrtable br { display: none }&lt;/style&gt;&lt;br /&gt;&lt;div class=&quot;nobrtable&quot;&gt;&lt;br /&gt;&lt;table cellspacing=&quot;0&quot; width=&quot;80%&quot; bgcolor=&quot;#ffffcc&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;pre&gt;SELECT prod_name, prod_price&lt;p&gt;&lt;/p&gt;&lt;br /&gt;FROM Products&lt;/pre&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;&lt;/span&gt;&lt;/p&gt;and you&#39;ll get:&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh3.google.com/abigoldenberg/R51XTOXdRPI/AAAAAAAAAG4/M97lCNmcT58/prodresult2%5B2%5D&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;188&quot; alt=&quot;prodresult2&quot; src=&quot;http://lh6.google.com/abigoldenberg/R51XT-XdRQI/AAAAAAAAAHA/kKigEXNsRFg/prodresult2_thumb&quot; width=&quot;244&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier;&quot;&gt;--------------------------------------&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Or you can use wildcards and retrieve all the columns:&lt;/p&gt;&lt;table cellspacing=&quot;0&quot; width=&quot;80%&quot; bgcolor=&quot;#ffffcc&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;pre&gt;SELECT *&lt;br /&gt;FROM Products&lt;/pre&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;&lt;/span&gt;&lt;/p&gt;and you&#39;ll see:&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://lh3.google.com/abigoldenberg/R51XPOXdRLI/AAAAAAAAAGY/lmqHpmiKYbY/partialprod%5B8%5D&quot;&gt;&lt;img style=&quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&quot; height=&quot;194&quot; alt=&quot;partialprod&quot; src=&quot;http://lh4.google.com/abigoldenberg/R51XQeXdRMI/AAAAAAAAAGg/qFxhKnaRRwk/partialprod_thumb%5B4%5D&quot; width=&quot;466&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In SQL, spaces don&#39;t count, and Enter presses don&#39;t either. Meaning that you can type:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;SELECT * &lt;/span&gt;&lt;span style=&quot;font-family:courier;&quot;&gt;FROM Products&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;and get the same results.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Next we will discuss the WHERE clause. Before that, I will post instructions on how to open the database in Microsoft Access and send it SQL queries.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/6884863212891823079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/6884863212891823079?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/6884863212891823079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/6884863212891823079'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/learning-basics-of-sql-part-one-select.html' title='Learning the Basics of SQL - Part One - The SELECT Statement'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-156190293364324605</id><published>2008-01-26T23:49:00.001-05:00</published><updated>2008-01-30T23:59:08.460-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tutorial"/><title type='text'>The Database On Which We&amp;#39;ll Be Basing Our SQL Guide</title><content type='html'>&lt;p&gt;I quickly learned SQL from a book named &lt;a href=&quot;http://www.amazon.com/gp/product/0672325675?ie=UTF8&amp;amp;tag=thenewhacguif-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0672325675&quot;&gt;Sams Teach Yourself SQL in 10 Minutes (3rd Edition) (Sams Teach Yourself)&lt;/a&gt;&lt;img style=&quot;BORDER-RIGHT: medium none; BORDER-TOP: medium none; MARGIN: 0px; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none&quot; height=&quot;1&quot; alt=&quot;&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=thenewhacguif-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0672325675&quot; width=&quot;1&quot; border=&quot;0&quot; /&gt;. It&#39;s well written and simply put. If you want to get more information than I&#39;ll be putting up, and don&#39;t want to spend to much time, I would recommend this book. They based it on a database available on their website. I don&#39;t know if they only let you download if you own the book, but it&#39;s available here:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.forta.com/books/0672325675&quot;&gt;&lt;span style=&quot;color:#0000ff;&quot;&gt;www.forta.com/books/0672325675&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I will also post the tables below, so that if you&#39;re not going through the guide hands-on, at least you&#39;ll be able to follow the outcomes.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Table named &#39;&lt;span style=&quot;font-size:130%;&quot;&gt;Customers&lt;/span&gt;&#39;:&lt;/p&gt;&lt;div class=&quot;scrollbox&quot;&gt;&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;492&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;cust_id&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;cust_name&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;cust_address&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;cust_city&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;cust_state&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;cust_zip&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;cust_country&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;cust_contact&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;cust_email&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;1000000001&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;Village Toys&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;200 Maple Lane&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;Detroit&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;MI&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;44444&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;USA&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;John Smith&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;sales@villagetoys.com&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;1000000002&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;Kids Place&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;333 South Lake Drive&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;Columbus&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;OH&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;43333&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;USA&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;Michelle Green&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt; &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;1000000003&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;Fun4All&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;1 Sunny Place&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;Muncie&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;IN&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;42222&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;USA&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;Jim Jones&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;jjones@fun4all.com&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;1000000004&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;Fun4All&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;829 Riverside Drive&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;Phoenix&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;AZ&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;88888&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;USA&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;Denise L. Stephens&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;dstephens@fun4all.com&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;1000000005&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;The Toy Store&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;4545 53rd Street&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;Chicago&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;IL&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;54545&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;USA&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;Kim Howard&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt; &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Table named &#39;&lt;span style=&quot;font-size:130%;&quot;&gt;Orders&lt;/span&gt;&#39;:&lt;/p&gt;&lt;div class=&quot;scrollbox&quot;&gt;&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;298&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;&lt;p&gt;order_num&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;87&quot;&gt;&lt;p&gt;order_date&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;109&quot;&gt;&lt;p&gt;cust_id&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;&lt;p&gt;20005&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&lt;p&gt;5/1/2004&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;109&quot;&gt;&lt;p&gt;1000000001&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;p&gt;20006&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;85&quot;&gt;&lt;p&gt;1/12/2004&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;109&quot;&gt;&lt;p&gt;1000000003&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;93&quot;&gt;&lt;p&gt;20007&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;84&quot;&gt;&lt;p&gt;1/30/2004&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;109&quot;&gt;&lt;p&gt;1000000004&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;92&quot;&gt;&lt;p&gt;20008&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;84&quot;&gt;&lt;p&gt;2/3/2004&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;109&quot;&gt;&lt;p&gt;1000000005&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;92&quot;&gt;&lt;p&gt;20009&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;85&quot;&gt;&lt;p&gt;2/8/2004&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;109&quot;&gt;&lt;p&gt;1000000001&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Table named &#39;&lt;span style=&quot;font-size:130%;&quot;&gt;OrderItems&#39;&lt;/span&gt;:&lt;/p&gt;&lt;div class=&quot;scrollbox&quot;&gt;&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;400&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;order_num&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;order_item&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;prod_id&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;quantity&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;item_price&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20005&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;BR01&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;100&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$5.49&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20005&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;2&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;BR03&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;100&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$10.99&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20006&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;BR01&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;20&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$5.99&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20006&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;2&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;BR02&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;10&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$8.99&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20006&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;3&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;BR03&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;10&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$11.99&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20007&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;BR03&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;50&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$11.49&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20007&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;2&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;BNBG01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;100&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$2.99&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20007&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;3&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;BNBG02&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;100&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$2.99&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20007&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;4&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;BNBG03&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;100&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$2.99&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20007&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;5&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;RGAN01&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;50&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$.4.49&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20008&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;RGAN01&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;5&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$4.99&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20008&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;2&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;BR03&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;5&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$11.99&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20008&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;3&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;BNBG01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;10&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$3.49&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20008&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;4&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;BNBG02&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;10&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$3.49&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20008&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;5&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;BNBG03&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;10&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$3.49&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20009&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;1&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;BNBG01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;250&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$2.49&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20009&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;2&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;BNBG02&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;250&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$2.49&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;&lt;p&gt;20009&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;3&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;BNBG03&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;250&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;80&quot;&gt;$2.49&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Table named &#39;&lt;span style=&quot;font-size:130%;&quot;&gt;Products&lt;/span&gt;&#39;&lt;/p&gt;&lt;div class=&quot;scrollbox&quot;&gt;&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;714&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;74&quot;&gt;&lt;p&gt;prod_id&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;76&quot;&gt;&lt;p&gt;vend_id&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;p&gt;prod_name&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;89&quot;&gt;&lt;p&gt;prod_price&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;383&quot;&gt;&lt;p&gt;prod_desc&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;76&quot;&gt;&lt;p&gt;BNBG01&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;77&quot;&gt;DLL01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;92&quot;&gt;&lt;p&gt;Fish bean bag toy&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;91&quot;&gt;&lt;p&gt;$3.49 &lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;383&quot;&gt;&lt;p&gt;Fish bean bag toy, complete with bean bag worms with which to feed it&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;76&quot;&gt;&lt;p&gt;BNBG02&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;DLL01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;p&gt;Bird bean bag toy&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;92&quot;&gt;&lt;p&gt;$3.49 &lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;383&quot;&gt;&lt;p&gt;Bird bean bag toy, eggs are not included&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;76&quot;&gt;&lt;p&gt;BNBG03&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;DLL01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;95&quot;&gt;&lt;p&gt;Rabbit bean bag toy&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;93&quot;&gt;&lt;p&gt;$3.49 &lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;383&quot;&gt;&lt;p&gt;Rabbit bean bag toy, comes with bean bag carrots&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;75&quot;&gt;BR01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;BRS01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;96&quot;&gt;&lt;p&gt;8 inch teddy bear&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;94&quot;&gt;$5.99&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;383&quot;&gt;&lt;p&gt;8 inch teddy bear, comes with cap and jacket&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;76&quot;&gt;BR02&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;BRS01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;96&quot;&gt;&lt;p&gt;12 inch teddy bear&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;94&quot;&gt;$8.99&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;383&quot;&gt;&lt;p&gt;12 inch teddy bear, comes with cap and jacket&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;76&quot;&gt;BR03&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;BRS01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;96&quot;&gt;&lt;p&gt;18 inch teddy bear&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;94&quot;&gt;$11.99&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;383&quot;&gt;&lt;p&gt;18 inch teddy bear, comes with cap and jacket&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;76&quot;&gt;RGAN01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;DLL01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;96&quot;&gt;&lt;p&gt;Raggedy Ann&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;94&quot;&gt;$4.99&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;383&quot;&gt;&lt;p&gt;18 inch Raggedy Ann doll&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;76&quot;&gt;RYL01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;FNG01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;96&quot;&gt;&lt;p&gt;King doll&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;94&quot;&gt;$9.49&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;383&quot;&gt;&lt;p&gt;12 inch king doll with royal garments and crown&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;76&quot;&gt;RYL02&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;FNG01&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;96&quot;&gt;&lt;p&gt;Queen doll&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;94&quot;&gt;$9.49&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;383&quot;&gt;&lt;p&gt;12 inch queen doll with royal garments and crown&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Table named &#39;&lt;span style=&quot;font-size:130%;&quot;&gt;Vendors&lt;/span&gt;&#39;&lt;/p&gt;&lt;div class=&quot;scrollbox&quot;&gt;&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;470&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;&lt;p&gt;vend_id&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;97&quot;&gt;&lt;p&gt;vend_name&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;127&quot;&gt;&lt;p&gt;vend_address&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;22&quot;&gt;&lt;p&gt;vend_city&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;24&quot;&gt;&lt;p&gt;vend_state&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;30&quot;&gt;&lt;p&gt;vend_zip&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;88&quot;&gt;&lt;p&gt;vend_country&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;79&quot;&gt;&lt;p&gt;BRE02&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;98&quot;&gt;&lt;p&gt;Bear Emporium&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;127&quot;&gt;&lt;p&gt;500 Park Street&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;22&quot;&gt;&lt;p&gt;Anytown&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;25&quot;&gt;&lt;p&gt;OH&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;30&quot;&gt;&lt;p&gt;44333&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;87&quot;&gt;&lt;p&gt;USA&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;78&quot;&gt;&lt;p&gt;BRS01&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;99&quot;&gt;&lt;p&gt;Bears R Us&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;127&quot;&gt;&lt;p&gt;123 Main Street&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;22&quot;&gt;&lt;p&gt;Bear Town&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;26&quot;&gt;&lt;p&gt;MI&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;30&quot;&gt;&lt;p&gt;44444&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&lt;p&gt;USA&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;79&quot;&gt;&lt;p&gt;DLL01&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;99&quot;&gt;&lt;p&gt;Doll House Inc.&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;127&quot;&gt;&lt;p&gt;555 High Street&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;22&quot;&gt;&lt;p&gt;Dollsville&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;26&quot;&gt;&lt;p&gt;CA&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;30&quot;&gt;&lt;p&gt;99999&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&lt;p&gt;USA&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;79&quot;&gt;&lt;p&gt;FNG01&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;99&quot;&gt;&lt;p&gt;Fun and Games&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;127&quot;&gt;&lt;p&gt;42 Galaxy Road&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;22&quot;&gt;&lt;p&gt;London&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;26&quot;&gt; &lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;30&quot;&gt;&lt;p&gt;N16 6PS&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&lt;p&gt;England&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;79&quot;&gt;&lt;p&gt;FRB01&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;99&quot;&gt;&lt;p&gt;Furball Inc.&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;127&quot;&gt;&lt;p&gt;1000 5th Avenue&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;22&quot;&gt;&lt;p&gt;New York&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;26&quot;&gt;&lt;p&gt;NY&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;30&quot;&gt;&lt;p&gt;11111&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&lt;p&gt;USA&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;79&quot;&gt;&lt;p&gt;JTS01&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;99&quot;&gt;&lt;p&gt;Jouets et ours&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;127&quot;&gt;&lt;p&gt;1 Rue Amusement&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;22&quot;&gt;&lt;p&gt;Paris&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;26&quot;&gt; &lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;30&quot;&gt;&lt;p&gt;45678&lt;/p&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&lt;p&gt;France&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;These are the tables we&#39;ll be working with as we progress through the lessons. Looking forward.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/156190293364324605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/156190293364324605?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/156190293364324605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/156190293364324605'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/database-on-which-we-be-basing-our-sql.html' title='The Database On Which We&amp;#39;ll Be Basing Our SQL Guide'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-2206949882058176073</id><published>2008-01-25T01:51:00.001-05:00</published><updated>2008-01-30T23:59:08.461-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tutorial"/><title type='text'>An Introduction to SQL itself</title><content type='html'>&lt;p&gt;Before we really start with SQL Injection, I think it is imperative that we first understand the SQL syntax on a basic level. I just finished reading a book &lt;a href=&quot;http://www.amazon.com/gp/product/0672325675?ie=UTF8&amp;amp;tag=thenewhacguif-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0672325675&quot;&gt;Sams Teach Yourself SQL in 10 Minutes (3rd Edition) (Sams Teach Yourself)&lt;/a&gt;&lt;img style=&quot;BORDER-RIGHT: medium none; BORDER-TOP: medium none; MARGIN: 0px; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none&quot; height=&quot;1&quot; alt=&quot;&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=thenewhacguif-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0672325675&quot; width=&quot;1&quot; border=&quot;0&quot; /&gt;.I must admit it took me quite a bit longer than 10 minutes, but it was definitely manageable. I skimmed through a big chunk and just got the needed information, which I will share with you. It will take me a few days to post the introduction, and only then will we continue with injections. (P.S. I only read the introduction afterwards. 10 minutes means it&#39;s split into 10 minute lessons.)&lt;/p&gt;&lt;p&gt;As I posted before, my computer was shipped out to be repaired. The screen has to be replaced. I was playing with an old laptop I have and got it working again. Anyway, I discovered a program called &quot;Windows Live Writer&quot;, a free program from Microsoft. It let&#39;s you write up your posts offline and just upload it when ready. Hopefully it will help me make my posts a little neater, but don&#39;t bet on it.&lt;/p&gt;&lt;p&gt;We&#39;ll be in touch!!!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/2206949882058176073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/2206949882058176073?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/2206949882058176073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/2206949882058176073'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/introduction-to-sql-itself.html' title='An Introduction to SQL itself'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-6287943038155077728</id><published>2008-01-23T19:53:00.001-05:00</published><updated>2008-01-23T22:32:04.510-05:00</updated><title type='text'>TheNewbieHacker.com is up and running</title><content type='html'>I finally had a chance to register and setup a new name. It&#39;s &lt;a href=&quot;http://www.thenewbiehacker.com&quot;&gt;thenewbiehacker.com&lt;/a&gt; . It it just a link that takes you to the blog. Hopefully, it&#39;s a little easier to remember than the old n00bhacker.blogspot.com. Enjoy.&lt;br /&gt;&lt;br /&gt;P.S. I am in the middle of reading a book on SQL so that I can understand and explain everything needed to know for SQL injection. Hopefully, by Sunday I&#39;ll be starting to post the whole topic in depth and with extreme clarity.</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/6287943038155077728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/6287943038155077728?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/6287943038155077728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/6287943038155077728'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/thenewbiehackercom-is-up-and-running.html' title='TheNewbieHacker.com is up and running'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3636633552446063973.post-7253010088694095255</id><published>2008-01-23T10:33:00.000-05:00</published><updated>2008-01-23T10:38:46.996-05:00</updated><title type='text'>Sorry for being a little slow</title><content type='html'>If you&#39;re anything like me, once you start learning something you can&#39;t get enough and don&#39;t have patience to wait for more. I understand and I apologize. First of all, for all those who commented that they want a writeup on WAP hacking, I&#39;ll post it after I finish with SQL injecting. I am reading a whole bunch of different sources to try to get the simples and most accurate information regarding SQL injection, and it&#39;s going to take a little more time. Also, my laptop screen backlight decided to die on me. I have it covered by PSP at Best Buy, but I was there yesterday and they told me it&#39;ll take about 3 weeks to get back. Get lost. I can&#39;t live that long wihtout my computer. We&#39;ll have to see what I can do. Untill then, I can still post through other means, but researching got a lot harder. I wouldn&#39;t want to test these things off someone else&#39;s computer. if you know what I mean. I&#39;ll try to get the information tested and posted as soon as possible. We&#39;ll speak.</content><link rel='replies' type='application/atom+xml' href='http://n00bhacker.blogspot.com/feeds/7253010088694095255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3636633552446063973/7253010088694095255?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/7253010088694095255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3636633552446063973/posts/default/7253010088694095255'/><link rel='alternate' type='text/html' href='http://n00bhacker.blogspot.com/2008/01/sorry-for-being-little-slow.html' title='Sorry for being a little slow'/><author><name>Miss Take</name><uri>http://www.blogger.com/profile/17288754097756840632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>