Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using the TAL Distributors Database from A Guide To SQL (9th Edition), Add a col

ID: 3719624 • Letter: U

Question

Using the TAL Distributors Database from A Guide To SQL (9th Edition), Add a column to the customer table to rank the relative size of the customer, Small, Medium or Large. Initially set all the customers to Medium. Create an index on the new size column. Display the customer number, customer name and size for all customers.

Schema:

?eject Browser ? ? c ?127.0.0.1:8080/apex/f?p-4500:1001:645686924296311-NO::: ORACLE Application Express welcome SYSTEM I Logout ? Home Application Bulder SQL Workshop - Hame S0L Workshop Object Browser Scherma LAL ' Help Tatles Create ? APEXS ACL APEXS_WS FILES WS HSTORY APEXS WS LINKS APEXS WS NOTES APLXS_Ws ROWS APEXS WS TAGS APEKS WS WEBPG SECTIONS DEMO CUSTOMERS DEMO ORDERS DEMO ORDER ITEMS DEMO PRODUCT DEMO STATES DEMO USERS DEPT HTMLDB PLAN REP Appication Lxpress 4.0 2.00.09 Wolapac TAL Uaer SYSTEM Language en Copynght &1330, 2010, Crade All rihts eserved

Explanation / Answer

Alter table command is used to add the new column to the table in database for this to specify default value along with the data type we need to specify default keyword and the value to set defaultly to all rows when we insert new or already existing rows.

Indexes are used for the faster retrieval of data from the database table. These are created on columns in the table. The above is the query to create the index on column Size in customer table.

The above select statement will retrieve the customer name and number and size from the customer table.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote