Power Selecting
(Page 1 of 6 )
An introduction to some of the modifiers and keywords available with SELECT to read, filter and sort database records as needed.
In my previous tutorial entitled Databases and SQL, I introduced databases and the language commonly used to interact with them, Structured Query Language (SQL). Database servers are stores of information allowing one to easily record and access large amounts of data for a variety of purposes. SQL commands afford a convenient way to interact with the server to add, maintain and retrieve the information.
In this tutorial I introduce some of the modifiers and keywords available with SELECT to read, filter and sort records from the database as needed. Specifically, I'll look at ORDER BY, DISTINCT, AS and LIKE.
If you haven't done so already, I recommend reading through the previous tutorial as that's where I first present the basic usage of the SELECT command.
For this tutorial I’ll assume a working database with the following table named Clients:
LastName FirstName Address City State ZipCode ---------------------------------------------------------------------- LaBelle Nathan 367 Pineview Ter Skaneateles NY 13152 Adams Gwendolyn 205 W Third St Brownville AL 35020 Smith Harold 321 Elm St Portsmouth RI 02871 Chavez Jose 14 Quailbush Dr Jasper TN 37347 Adams Joseph 214 Main St Seattle WA 98102 Copland Dorothy 639 Spring St West Sacramento CA 95691 Johnson Diane 82 Richardson Ave Fresno CA 93702 Smith Aaron 9112 Main St San Diego CA 92119 Franklin Susanna 293 Lamont Dr Tempe AZ 85283 Wilson Jessica 227 Washington Ave Irving TX 75061 Brown Michael 2336 NE Cranston Blvd Terre Haute IN 47814 Smith Josh 52 Harding Ln Franklin MA 02038 |
Next: Order By >>
More Database Articles Articles
More By bluephoenix