Question: Write SQL commands to create the type and type body for an object type called TotalSales that represents the sales of a bookstore. The TotalSales

 Write SQL commands to create the type and type body for

Write SQL commands to create the type and type body for an object type called TotalSales that represents the sales of a bookstore. The TotalSales type should have: three attributes called 'book', 'unitPrice and quantity with respective datatype; and one method called 'set TotalSales that returns the sales (as DECIMAL). The TotalSales type may not have subtypes. b) Write an SQL statement to create table BookSales that has TWO (2) attributes: salespersonName of type varchar and Saledmount of type Zatalsales, 0 Write an INSERT statement to enter data into table BookSales, d) Write a SELECT statement to display SalesPersonName and totalSales columns in BookSales table

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!