SQL Commands. Modify the following select statement to remove the hard-coded values $1.00 and $2.00 from the code and place them in a table of constants. The table sec0306_price_constants is already set up for you. The min_price field = 1.00 and the max_price field = 2.00. When I make a change like this, in addition to replacing the hard-coded values, I often put those values in the select clause so I can see exactly what the values are whenever I run the SQL code. select description from l_foods where price between 1.00 and 2.00 order by description;

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter8: Sql Functions And Procedures
Section: Chapter Questions
Problem 9TD
icon
Related questions
icon
Concept explainers
Question
100%

SQL Commands.

Modify the following select statement to remove the hard-coded values $1.00 and $2.00 from the code and place them in a table of constants.


The table sec0306_price_constants is already set up for you. The min_price field = 1.00 and the max_price field = 2.00.
When I make a change like this, in addition to replacing the hard-coded values, I often put those values in the select clause so I can see exactly what the values are whenever I run the SQL code.


select description
from l_foods
where price between 1.00 and 2.00
order by description;

↑ SQL Commands
Language SQL
1
2
APEX
3
4
BROCCOLI
select description
from 1_foods
where price between 1.00 and 2.00
order by description;
FRENCH FRIES
App Builder ✓ SQL Workshop ✓
Results Explain Describe Saved SQL History
FRESH SALAD
SODA
? Rows 10
A::
SOUP OF THE DAY
5 rows returned in 0.01 seconds Download
Team Development ✓
(?) Clear Command
Gallery
Find Tables
DESCRIPTION
Q Search
& ? MP Michael Porter
micpor9577
Schema WKSP_MICPOR9577
Save Run
Transcribed Image Text:↑ SQL Commands Language SQL 1 2 APEX 3 4 BROCCOLI select description from 1_foods where price between 1.00 and 2.00 order by description; FRENCH FRIES App Builder ✓ SQL Workshop ✓ Results Explain Describe Saved SQL History FRESH SALAD SODA ? Rows 10 A:: SOUP OF THE DAY 5 rows returned in 0.01 seconds Download Team Development ✓ (?) Clear Command Gallery Find Tables DESCRIPTION Q Search & ? MP Michael Porter micpor9577 Schema WKSP_MICPOR9577 Save Run
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Query Syntax
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
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
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
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning