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 4, Problem 15CAT
Program Plan Intro

“SELECT” command:

The “SELECT” command is used to retrieve data in a database.

Syntax for selecting values from the table is as follows:

SELECT STUDENT_ID FROM STUDENT;

  • The given query is used to display each student ID from “STUDENT” table.

“DISTINCT” Operator:

  • Using “DISTINCT” operator, user can eliminate the duplicate values in a query’s results.

Example:

The example for “DISTINCT” operator is given below:

SELECT DISTINCT(STUDENT_ID) FROM STUDENTS;

The above query is used to list number of each student ID only once using “DISTINCT” operator.

Blurred answer
Students have asked these similar questions
List the employee’s first and last name and the department name he/she does NOT belong topurchasing, shipping, or sales departments. Use Not operator.
Classify students according to the total number of hours they have completed. (Less than30=freshman, 30 to 59 is sophomore, 60 to 89 is junior, 90+ senior)

Chapter 4 Solutions

A Guide to SQL

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
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