Database Concepts (8th Edition)
Database Concepts (8th Edition)
8th Edition
ISBN: 9780134601533
Author: David M. Kroenke, David J. Auer, Scott L. Vandenberg, Robert C. Yoder
Publisher: PEARSON
bartleby

Concept explainers

Question
Book Icon
Chapter 3, Problem 3.32RQ
Program Plan Intro

SQL:

  • SQL stands for “Structured Query Language”.
  • The current version of SQL is “ANSI SQL – 92”.
  • It contains constructs which are used to define and process database. They are executed using DBMS-supplied command prompt.
  • SQL is not a programming language. It is text-based and it is also called as data sublanguage. In order to get SQL as a complete programming language, it should be included in scripting languages like Java, C#, and so on.

Display values from table:

The contents from the table can be viewed by using “SELECT” statement which comes under Data Manipulation Language (DML). Syntax to view the contents using asterisk (*) is as follows:

SELECT * FROM table_Name;

Grouping Rows:

SQL contains “GROUP BY” clause in order to group rows by common data. Though it is very powerful feature, it is hard to understand.

Syntax:

SELECT column_Name1 FROM table_Name GROUP BY column_Name2;

Example: Consider a table “student” contains two columns “student_Name” and “Department”. “GROUP BY” clause is used when there is a need to get the number of students from each department.

The query for this scenario is given as follows.

SELECT department, COUNT (department) FROM student GROUP BY department;

When the above query is executed, number of students from each department will be displayed.

Blurred answer
Students have asked these similar questions
Write an SQL statement to display all columns of all rows of PET. Do not use the asterisk (*) notation
Write an SQL statement to display the PetBreed column of PET.
Write an SQL statement to group the data by PetBreed and display the average weight per breed.

Chapter 3 Solutions

Database Concepts (8th Edition)

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.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781285196145
    Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
    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
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr