A Guide to SQL
A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
bartleby

Concept explainers

Question
Book Icon
Chapter 5, Problem 12TD
Program Plan Intro

WHERE Statement:

“WHERE” statement is used limit the number of rows. For example:Consider a table “FTable” that has two columns named “FruitName” and “Color”. “WHERE” clause is used when there is a need to display the entire FruitName whose color is Red.

SELECT * FROM FTable WHERE color = 'red';

When the above statement is executed, red colored fruits get displayed.

ORDER BY Clause:

SQL contains “ORDER BY” clause in order to sort rows. The values get sorted in ascending as well as descending order. The keyword used to sort values in ascending order is “ASC” and for descending order is “DESC”. By default, it sorts values by ascending order.

Syntax:

SELECT column_Name1, column_Name2 FROM table_Name ORDER BY column_Name2;

Blurred answer
Students have asked these similar questions
7. List all customers who were referred to the bookstore by another customer. List eachcustomer’s last name and the number of the customer who made the referral.
Find the first names and last names of employees if they got a salary increase more than 10% in the first month of 2000 together with their salary change dates, old salaries, new salaries, and increase percentages in descending order by their increase percentages.
Show all name and phone numbers of students and the type of donation they received including any unmatched student.table name;StudentDonationVolunteer
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage