101k views
0 votes
I AM USING MYSQL WORKBENCH

USING KIMTAY DATABASE
QUESTION:
2. Create a view named ITEM_INVOICE. It consists of the item ID,
description, price, invoice number, invoice date, number ordered,
and quoted

User Volna
by
8.6k points

1 Answer

5 votes

Final answer:

To create the ITEM_INVOICE view, use a CREATE VIEW statement, joining necessary columns from the items and invoices tables, assuming such tables exist in the KIMTAY database.

Step-by-step explanation:

To create a view named ITEM_INVOICE in MySQL Workbench using the KIMTAY database, you need to define the view with the specified columns from the relevant tables. Here is an example SQL statement to create the view:

CREATE VIEW ITEM_INVOICE AS
SELECT item_id, description, price, invoice_number, invoice_date, number_ordered, quoted
FROM items
JOIN invoices ON items.invoice_id = invoices.id;

This SQL statement assumes that there is an items table with item_id, description, price, and invoice_id columns, and an invoices table with invoice_number, invoice_date, number_ordered, and quoted columns. The tables are joined on the invoice_id. Please make sure to adjust the column names and table names to match your actual database schema.

User Mohammed Bekele
by
8.0k points