Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ORACLE SQL (1) Write and run an ALTER TABLE command to add a column that is of the TIMESTAMP data type to the hold_02 table

ORACLE SQL

(1) Write and run an ALTER TABLE command to add a column that is of the TIMESTAMP data type to the hold_02 table in your schema. Name the new column the hold_date_ts. (2) Write and run commands to retrieve the data from the altered table, and to update a record by adding in a timestamp type value into the new column that is 5 hours 5 minutes and 5.55 seconds later than the date and time value in the hold_date column of the row you are updating. To do this, just manually calculate the new value to be inserted and use TO_TIMESTAMP to convert the string representation to TIMESTAMP type for insertion. Note* You may have to look forward in the Murach book to find information about the TO_TMESTAMP function to help you accomplish this task. Also note that if you choose an existing record with the time value of midnight, the arithmetic is not difficult. Also write a command to retrieve the row with the updated data. (3) Now write and run an ALTER TABLE command to add a column that is of the TIMESTAMP WITH TIMEZONE data type, also adding the column to the hold_02 table. Name the new column expire_date_tz. (4) Write and run commands to retrieve the data you changed in step 3 from the altered table, and to update the same record by adding in a timestamp with timezone type value into expire_date_tz that is 7 hours 7 minutes and 7.77 seconds later than the date and time value expire_date column of the row you are updating and that is in a different time zone. Use functions demonstrated in Murach Chapter 17 to help you as needed, but use manual addition to predetermine the string value that represents the timestamp value you want to insert. Also write a command to retrieve the row with the updated data.*

Hold_02 table consists of:

image text in transcribed

This is all one question. Apologies. Please provide syntax

COLUMN NAME HOLD ID TOOL_NO TOOL DESC ID EMPLOYEE ID JOB ID HOLD DATE EXPIRE DATE HOLD ACTIVE HOLD STATUS CHANGE DATE DATE DATA TYPE NUMBER (8,0) NUMBER (8,0) NUMBER (8,0) NUMBER (8,0) NUMBER (8,0) DATE DATE VARCHAR2 (8 BYTE) NULLABLE DATA DEFAULT COLUMN IDCOMMENTS No No No No Yes No Yes No No (null) (null) (null) (null) (null) (null) (null) (null) (null) 1 (null) 2 (null) 3 (null) 4 (null) 5 (null) 6 (null) 7 (null) 8 (null) 9 (null)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Shouhong Wang, Hai Wang

1st Edition

1612330150, 978-1612330150

More Books

Students also viewed these Databases questions

Question

Question What is a Roth 403 (b) plan?

Answered: 1 week ago

Question

Question Can a Keogh plan fund be reached by the owners creditors?

Answered: 1 week ago