Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 13, Problem 3HOA
Create a view called HOMEWORK13 that includes the columns named Col1 and Col2 from the FIRSTATTEMPT table. Make sure the view is created even if the FIRSTATTEMPT table doesn’t exist.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Create a read-only view, name it as ViewD, that will contain RType and the number of rooms per RType in the ROOMS table.
WEEK 2 ASSIGNMENT
Complete the following exercise:
Using the student table you created in week one insert four rows into your table.
Update the first name to “Luke” and last name to “Plew” for one of the rows you inserted above.
Delete the row you updated above.
Explain how you insert data in one table from another table. Your answer should be a minimum of three sentences in length.
Use the data from the class assignment, ALTER TABLE and add two more columns Phone and email.
Describe the table (show its structure) and drop the country column, describe the table (show structure). Now, create a new table based on the existing table person with the help of a subquery (The new table will contain the data from “person” table) and name the table person_self. Show its output (table created and its structure).
NOTE:
Use the ALTER TABLE command with ADD clause
Use the ALTER TABLE command with DROPCOLUMN clause
Use the CREATE TABLE command with AS (SELECT SUBQUERY) clause
Knowledge Booster
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
- Change the CONTACT view so that no users can accidentally perform DML operations on the view.arrow_forwardCreate a new table maned “Hiking” that includes TripID, NumPersons from Reservation table and Trip Type, Trip Name columns from Trip table where Trip type is “Hiking” .arrow_forwardCREATE OR REPLACE VIEW view_name ASSELECT column1, column2, ...FROM table_nameWHERE condition; in oracle the Drop view DROP VIEW view_name;arrow_forward
- 8. Create a trigger for the Invoices table that automatically inserts the vendor name and address for a paid invoice into a table named ShippingLabels. The trigger should fire any time the PaymentTotal column of the Invoices table is updated. The structure of the ShippingLabels table is as follows: CREATE TABLE ShippingLabels (VendorName varchar(50), VendorAddress1 varchar(50), VendorAddress2 varchar(50), VendorCity VendorState VendorZipCode varchar(50), char(2), varchar(20)); Use this UPDATE statement to test the trigger: UPDATE Invoices SET PaymentTotal = 67.92, PaymentDate = '2020-02-23' WHERE InvoiceID = 100;arrow_forwardRefer to the following statement DROP TABLE IF EXISTS tb1_name; What does a statement based on this syntax do? It prevents a view being generated for a nonexistent table. It drops a table only if it does not contain a NULL value. It generates a warning about a nonexistent table. It prohibits a given table being dropped.arrow_forward15. Open the AttendeeFirstName query in Design View and add criteria to select only those records where the FirstName field value begins with Lau followed by any other letters. Save the changes to the query. Open the query in Datasheet View, confirm that two records appear in the query results, and then close it.arrow_forward
- Two tables are created: Horse with columns: ID - integer, primary key RegisteredName - variable-length string Student with columns: ID - integer, primary key FirstName - variable-length string LastName - variable-length string Create the LessonSchedule table with columns: HorseID - integer with range 0 to 65 thousand, not NULL, foreign key references Horse(ID) StudentID - integer with range 0 to 65 thousand, foreign key references Student(ID) LessonDateTime - date/time, not NULL Primary key is (HorseID, LessonDateTime) If a row is deleted from Horse, the rows with the same horse ID should be deleted from LessonSchedule automatically. If a row is deleted from Student, the same student IDs should be set to NULL in LessonSchedule automatically. Notes: Table and column names are case sensitive in the auto-grader. Your SQL code does not display any results in Develop mode. Use Submit mode to test your code.arrow_forward-- 2 - Write a View to show all customer Ids that have placed orders --(Sales.SalesOrderHeader sh and Person. Person are joined on CustomerID = Business EntityID)arrow_forwardI am working on Task 7. Task 7: Create a view named MONTHLY_RENTS. It consists of three columns: the first is the number of bedrooms, the second is the average square feet, and the third is the average monthly rent for all properties in the PROPERTY table that have that number of bedrooms. Use BEDROOMS, AVG_SQUARE_FEET, and AVG_MONTHLY_RENT as the column names. Group and order the rows by number of bedrooms. Here is Tasks 1-7 and what I wrote for Task 8. When I input Task 8, I am not getting results at all. Expected Results Tables_in_StayWell Table_type MONTHLY_RENTS VIEWarrow_forward
- Add validation on CTYPE column in CUSTOMERS table. It must accept either ‘New’ or ‘Old’ only.arrow_forwardwhy is my qryLevelParameter query coming up blank?? Create a new parameter query in Design View based on the tblStates table and the tblSessions table as described below: Add the StateName field from the tblStates table to the query. After the StateName field, add the SessionName, SessionLocation, and Level fields (in that order) from the tblSessions table to the query. Enter a parameter criterion associated with the Level field that uses the following prompt text: “Type Primary, Intermediate, or Senior” Run the query, enter Primary when prompted, and then confirm that 17 records are returned.arrow_forwardQuestion 8: Which statement is incorrect regarding tables? Answer: A. B. C. D. You can convert a worksheet list into a table. Since table data cannot be modified, the Re-create button stays active so you can easily start over. If the table range Excel proposes isn't correct, just change it before creating the table. Table formatting can be applied and changed after the table has been created.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage Learning
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
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
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY