A GUIDE TO SQL
A GUIDE TO SQL
9th Edition
ISBN: 9781305897397
Author: Pratt
Publisher: CENGAGE L
bartleby

Concept explainers

Expert Solution & Answer
Book Icon
Chapter 4, Problem 5RQ

Explanation of Solution

Computed column in SQL:

  • User can perform computations using SQL queries.
  • A computed column does not occurs in the database however it can be computed by using data present in the existing columns.
  • The computations can involve any arithmetic operator.
  • Computations can computed by using the arithmetic operator such + (addition), - (subtraction), * (multiplication) and / (division).
    • Then write the computation result into a place of a particular column name.

Example:

The example for using computed column in SQL is given below:

SELECT STUDENT_ID, STUDENT_NAME, MAXIMUM_LIMIT – SCORE FROM STUDENT;

The above query is used to display student id, student name and student credit from “STUDENT” table...

Explanation of Solution

Naming the computed column in SQL:

  • User can assign a name to the computation by using below ways:
    • Name the computation with the word “AS”.
    • User desired name.

Example:

The example for naming the computed column in SQL is shown below:

SELECT STUDENT_ID, STUDENT_NAME, MAXIMUM_LIMIT – SCORE AS STUDENT_CREDIT FROM STUDENT;

The above query is used to display student id, student name and student credit from “STUDENT” table...

Blurred answer
Students have asked these similar questions
Pllleasassseee ssiiirrrr soolveee thissssss questionnnnnnn
Pllleasassseee ssiiirrrr soolveee thissssss questionnnnnnn
Pllleasassseee ssiiirrrr soolveee thissssss questionnnnnnn

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.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education