Customer Login  .   Webmail Login  .   About Us  .   Contact Us
Go to: Articles List

SQL Basics Part 2 : Select with the Where Clause

Using the where clause adds power to the select statement. It allows you to narrow the amount of records that are returned back to you. For example, if you have a table that contains customer data and you want to get information for a specific customer out of it. You might issue a select statement like this:

SELECT * FROM CustomerData WHERE lname = 'Smith'

This would return to you all the columns from the CustomerData table and all of the records that had a last name equal to 'Smith'. What if you wanted all of the records that the last name started with 'S':

SELECT * FROM CustomerData WHERE lname LIKE 'S%'

The difference here is the addition of the keyword LIKE and the % sign. The % sign is a wildcard and the LIKE keyword does just what is says, shows you records like what you specify.

Shared Hosting
Rookie
Pro
Advanced
Dedicated Servers
BASE
BUSINESS
ENTERPRISE
Why Choose Brinkster?
Radical Support
Brinkster Datacenter
Brinkster Network
Corporate Social Responsibility
90 Day Money Back Guarantee
Unsurpassed Value
Client Testimonials
Additional Features
Antivirus
Merchant Account
E-Commerce
Live Chat Communicator
Free Firewall
Website Builder
Free Web Hosting
Support
General Support
Codebank Search
Forums
Articles
Click here for Brinkster Live Chat
Home   Domains   Shared Hosting   Dedicated Hosting   Partner   Support   About Us    Contact Us   Webmail
Copyright © Brinkster Communications Corporation All Rights Reserved. Privacy Policy & Legal