I am having some issues in MySQL Workbench. Please take a look at the images and tell me what I am doing wrong and answer the questions:

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I am having some issues in MySQL Workbench. Please take a look at the images and tell me what I am doing wrong and answer the questions: 

  1. Write MySQL, procedures to retrieve and output the item ID, description, location, and price of every item in the category stored in I_CATEGORY.
  2. Write a stored procedure in MySQL, that changes the price of an item with a given item ID. How would you use this stored procedure to change the price of item AD72 to $84.99?

Please let me know if any other info is needed to get this to work correctly. 

vA View
MYSQL Workbench
O X
Local instance MYSQL80 x
File
Edit
View
Query
Database
Server
Tools
Scripting
Help
Navigator :
SQL File 14*
SQL File 18
SQL File 19*
SOL File 20
SQL File 13"
SQLAdditions
• | 1 , | Jump to
SCHEMAS
Limit to 1000 rows
a Filter objects
Automatic context help is
disabled. Use the toolbar t
v9 kimtay
2 •0 CREATE PROCEDURE ITEM CATGRY_PROC (
Tables
3 0
I_ITEM_ID QUT ITEM.ITEM_ID%TYPE,
manually get help for the
current caret position or to
toggle automatic help.
customer
I_DESCRIPTION OUT ITEM.DESCRIPTIONXTYPE,
I LOCATION OUT ITEM. LOCATIONXTYPE,
4
O Columns
A Indexes
A Foreign Keys
G Triggers
invoice_line
I PRICE OUT ITEM.PRICEXТҮРЕ,
I_CATEGORY IN ITEM.CATEGORYXTYPE)
invoices
8
AS
item
va Columns
A BEGIN
10
SELECT ITEM_ID, DESCRIPTION, LOCATION, PRICE,
ПЕМ_ID
DESCRIPTION
11
INTO
ON_HAND
12
I_ITEM_ID, I_DESCRIPTION, I_LOCATION, I_PRICE,
CATEGORY
13
FROM
LOCATION
PRICE
14
ITEM
9 Indexes
A Foreign Keys
A Triggers
15
WHERE
CATEGORY = I CATEGORY;
DBMS OUTPUT.PUT_LINE (I_ITEM_ID);
16
noncat
17 0
I rep
I sales_rep
18 3
REMSQUTPUT. PUT_LINE(I_DESCRIPTION);
DEMS OUTPUT. PUT_LINE(I_LOCATION);
DEMS OUTPUT. PUT_LINE(I_PRICE);
19 0
20 3
invoice_total
DBMS OUTPUT. PUT LINE;
item_invoice
E major_customer
v A Stored Procedures
A GET_CREDIT_LIMIT
E Functions
9 sakila
E sys
E world
21 0
22 0
END;
23
24
Administration Schemas
Information
Context Help Snippets
No object selected
Output
A Action Output
Duration
Time
Action
Message
/ Fetch
1 12:55:50 CREATE PROCEDURE ITEM_CATGRY_PROC (I_ITE..
Error Code: 1064, You have an error in your SQL syntax;
0.000 sec
Object Info
Session
6. Write MYSQL, procedures to retrieve and output the item ID, description, location, and
price of every item in the category stored in I_CATEGORY.
Complete this question
7. Write a stored procedure in MYSQL, that changes the price of an item with a given item
ID. How would you use this stored procedure to change the price of item AD72 to
$84.99?
Hint:
DEL. //
CREATE PROCEDURE ADD INVOICE (IN I INVOICE NUM CHAR (5),
IN I INVOICE DATE DATE,
IN I CUST ID CHAR (5))
Complete this question
Transcribed Image Text:vA View MYSQL Workbench O X Local instance MYSQL80 x File Edit View Query Database Server Tools Scripting Help Navigator : SQL File 14* SQL File 18 SQL File 19* SOL File 20 SQL File 13" SQLAdditions • | 1 , | Jump to SCHEMAS Limit to 1000 rows a Filter objects Automatic context help is disabled. Use the toolbar t v9 kimtay 2 •0 CREATE PROCEDURE ITEM CATGRY_PROC ( Tables 3 0 I_ITEM_ID QUT ITEM.ITEM_ID%TYPE, manually get help for the current caret position or to toggle automatic help. customer I_DESCRIPTION OUT ITEM.DESCRIPTIONXTYPE, I LOCATION OUT ITEM. LOCATIONXTYPE, 4 O Columns A Indexes A Foreign Keys G Triggers invoice_line I PRICE OUT ITEM.PRICEXТҮРЕ, I_CATEGORY IN ITEM.CATEGORYXTYPE) invoices 8 AS item va Columns A BEGIN 10 SELECT ITEM_ID, DESCRIPTION, LOCATION, PRICE, ПЕМ_ID DESCRIPTION 11 INTO ON_HAND 12 I_ITEM_ID, I_DESCRIPTION, I_LOCATION, I_PRICE, CATEGORY 13 FROM LOCATION PRICE 14 ITEM 9 Indexes A Foreign Keys A Triggers 15 WHERE CATEGORY = I CATEGORY; DBMS OUTPUT.PUT_LINE (I_ITEM_ID); 16 noncat 17 0 I rep I sales_rep 18 3 REMSQUTPUT. PUT_LINE(I_DESCRIPTION); DEMS OUTPUT. PUT_LINE(I_LOCATION); DEMS OUTPUT. PUT_LINE(I_PRICE); 19 0 20 3 invoice_total DBMS OUTPUT. PUT LINE; item_invoice E major_customer v A Stored Procedures A GET_CREDIT_LIMIT E Functions 9 sakila E sys E world 21 0 22 0 END; 23 24 Administration Schemas Information Context Help Snippets No object selected Output A Action Output Duration Time Action Message / Fetch 1 12:55:50 CREATE PROCEDURE ITEM_CATGRY_PROC (I_ITE.. Error Code: 1064, You have an error in your SQL syntax; 0.000 sec Object Info Session 6. Write MYSQL, procedures to retrieve and output the item ID, description, location, and price of every item in the category stored in I_CATEGORY. Complete this question 7. Write a stored procedure in MYSQL, that changes the price of an item with a given item ID. How would you use this stored procedure to change the price of item AD72 to $84.99? Hint: DEL. // CREATE PROCEDURE ADD INVOICE (IN I INVOICE NUM CHAR (5), IN I INVOICE DATE DATE, IN I CUST ID CHAR (5)) Complete this question
A MYSQL Workbench
Local instance MYSQL80 x
File
Edit
View
Query
Database
Server
Tools
Scripting Help
Navigator :
SQL File 14
SQL File 18
SQL File 19*
SQL File 20* x SQL File 13*
SQLAdditions www
SCHEMAS
• | 12 1, | Jump to
Limit to 1000 rows
a Filter objects
1
Automatic context help is
disabled. Use the toolbar t
v9 kimtay
2• 0 CREATE PROCEDURE ITEM CATGRY PROC (
Tables
I_ITEM_ID QUT ITEM.ITEM_ID%TYPE,
manually get help for the
VE customer
O Columns
E Indexes
A Foreign Keys
A Triggers
A invoice line
4
I DESCRIPTI "OUT" is not valid at this position, expecting BIGINT, BINARY, BIT, BLOB, BOOLEAN, BOOL, ...
I LOCATION OUT ITEM. LOCATION%TYPE,
toggle automatic help.
I_PRICE OUT ITEM.PRICEXTYPE,
7
I CATEGORY IN ITEM.CATEGORY%TYPE)
invoices
8
AS
item
O BEGIN
VO Columns
10
SELECT ITEM ID, DESCRIPTION, LOCATION, PRICE,
+ ПЕМ ID
• DESCRIPTION
• ON_HAND
• CATEGORY
• LOCATION
• PRICE
A Indexes
A Foreign Keys
A Triggers
11
INTO
12
I_ITEM_ID, I_DESCRIPTION, I_LOCATION, I_PRICE,
13
FROM
14
ITEM
15
WHERE
16
CATEGORY = I CATEGORY;
DEMS QUTPUT. PUT_LINE (I_ITEM_ID);
DBMS OUTPUT. PUT_LINE(I_DESCRIPTION);
DEMS OUTPUT.PUT LINE(I LOCATION);
попcat
17 0
rep
18 0
>I sales_rep
19 0
DEMS OUTPUT. PUT_LINE(I_PRICE);
DEMS QUTPUT.PUT_LINE;
20 0
E invoice_total
O item_invoice
21 0
>E major_customer
a Stored Procedures
A GET CREDIT_LIMIT
E Functions
22 0
END;
23
24
>3 sakila
>E sys
>E world
Administration
Schemas
Information
Context Help Snippets
No object selected
Output *
A Action Output
Duration
/ Fetch
Time
Action
Message
1 12:55:50 CREATE PROCEDURE ITEM_CATGRY_PROC (L_ITE.
Error Code: 1064. You have an error in your SQL syntax; . 0.000 sec
Object Info Session
6. Write MYSQL, procedures to retrieve and output the item ID, description, location, and
price of every item in the category stored in I_CATEGORY.
Complete this question
7. Write a stored procedure in MySQL, that changes the price of an item with a given item
ID. How would you use this stored procedure to change the price of item AD72 to
$84.99?
Hint:
DEL. //
CREATE PROCEDURE ADD INVOICE (IN I INVOICE NUM CHAR (5),
IN I INVOICE DATE DATE,
IN I CUST ID CHAR (5))
Complete this question
AA AAAA
Transcribed Image Text:A MYSQL Workbench Local instance MYSQL80 x File Edit View Query Database Server Tools Scripting Help Navigator : SQL File 14 SQL File 18 SQL File 19* SQL File 20* x SQL File 13* SQLAdditions www SCHEMAS • | 12 1, | Jump to Limit to 1000 rows a Filter objects 1 Automatic context help is disabled. Use the toolbar t v9 kimtay 2• 0 CREATE PROCEDURE ITEM CATGRY PROC ( Tables I_ITEM_ID QUT ITEM.ITEM_ID%TYPE, manually get help for the VE customer O Columns E Indexes A Foreign Keys A Triggers A invoice line 4 I DESCRIPTI "OUT" is not valid at this position, expecting BIGINT, BINARY, BIT, BLOB, BOOLEAN, BOOL, ... I LOCATION OUT ITEM. LOCATION%TYPE, toggle automatic help. I_PRICE OUT ITEM.PRICEXTYPE, 7 I CATEGORY IN ITEM.CATEGORY%TYPE) invoices 8 AS item O BEGIN VO Columns 10 SELECT ITEM ID, DESCRIPTION, LOCATION, PRICE, + ПЕМ ID • DESCRIPTION • ON_HAND • CATEGORY • LOCATION • PRICE A Indexes A Foreign Keys A Triggers 11 INTO 12 I_ITEM_ID, I_DESCRIPTION, I_LOCATION, I_PRICE, 13 FROM 14 ITEM 15 WHERE 16 CATEGORY = I CATEGORY; DEMS QUTPUT. PUT_LINE (I_ITEM_ID); DBMS OUTPUT. PUT_LINE(I_DESCRIPTION); DEMS OUTPUT.PUT LINE(I LOCATION); попcat 17 0 rep 18 0 >I sales_rep 19 0 DEMS OUTPUT. PUT_LINE(I_PRICE); DEMS QUTPUT.PUT_LINE; 20 0 E invoice_total O item_invoice 21 0 >E major_customer a Stored Procedures A GET CREDIT_LIMIT E Functions 22 0 END; 23 24 >3 sakila >E sys >E world Administration Schemas Information Context Help Snippets No object selected Output * A Action Output Duration / Fetch Time Action Message 1 12:55:50 CREATE PROCEDURE ITEM_CATGRY_PROC (L_ITE. Error Code: 1064. You have an error in your SQL syntax; . 0.000 sec Object Info Session 6. Write MYSQL, procedures to retrieve and output the item ID, description, location, and price of every item in the category stored in I_CATEGORY. Complete this question 7. Write a stored procedure in MySQL, that changes the price of an item with a given item ID. How would you use this stored procedure to change the price of item AD72 to $84.99? Hint: DEL. // CREATE PROCEDURE ADD INVOICE (IN I INVOICE NUM CHAR (5), IN I INVOICE DATE DATE, IN I CUST ID CHAR (5)) Complete this question AA AAAA
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

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