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 5, Problem 3HOA
Save the changes permanently to the
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
The Developers team also wants you to ensure that emails are converted to lowercase
after an update operation. Currently, new insertions are guaranteed to have lowercase
emails, but there is no such guarantee for legacy emails. Therefore, the team wants to
ensure that emails are being retained in a lowercase irrespective of any changes in the
database. Create a new TRIGGER called email_update for the USERS table that runs
before an UPDATE operation.
Task
Create a TRIGGER to run on the USERS table before any UPDATE operation.
Task 5:
The Developers team also wants you to ensure that emails are converted to lowercase after an update operation. Currently, new insertions are guaranteed to have lowercase emails, but there is no such guarantee for legacy emails. Therefore, the team wants to ensure that emails are being retained in a lowercase irrespective of any changes in the database. Create a new TRIGGER called email_update for the USERS table that runs before an UPDATE operation.
Create a table in your own database using the following statement. CREATE TABLE DateRange (DateID INT IDENTITY, DateValue DATE, DayOfWeek SMALLINT, Week SMALLINT, Month SMALLINT, Quarter SMALLINT, Year SMALLINT ); Write a stored procedure that accepts two parameters: A starting date The number of the consecutive dates beginning with the starting date The stored procedure then inserts data into all columns of the DateRange table according to the two provided parameters.
Chapter 5 Solutions
Oracle 12c: SQL
Ch. 5 - Which command should you use to copy data from one...Ch. 5 - Which command can you use to change the existing...Ch. 5 - Which of the following is a correct statement? a....Ch. 5 - Which of the following is a valid SQL...Ch. 5 - Which of the following statements deletes all rows...Ch. 5 - What is the maximum number of records that can be...Ch. 5 - Add a new row in the ORDERS table with the...Ch. 5 - Prob. 2HOACh. 5 - Save the changes permanently to the database.
Ch. 5 - Add a new row in the ORDERS table with the...
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
- Task 5: The Developers team also wants you to ensure that emails are converted to lowercase after an update operation. Currently, new insertions are guaranteed to have lowercase emails, but there is no such guarantee for legacy emails. Therefore, the team wants to ensure that emails are being retained in a lowercase irrespective of any changes in the database. Create a new TRIGGER called email_update for the USERS table that runs before an UPDATE operation. Task: Create a TRIGGER to run on the USERS table before any UPDATE operation. (SQL Database Test): Create a TRIGGER before any UPDATE operations on the USERS tablearrow_forwardCreate a procedure to allow company employee to add new product to the database. This procedure needs only IN parameters.arrow_forwardWhich function can be used to add spaces to a column until it’s a specific width? (refer to the tables in the JustLee Books database.)a. TRIMLb. PADLc. LWIDTHd. none of the abovearrow_forward
- The Driver Relationship team realized that maintaining driver IDs is difficult and requested an automatic way of incrementing the value when a new driver is added. You need to make the changes on the table to automatically increment the DRIVER_ID. After the change, you need to insert the following driver: First Name: Nursin Last Name: Yilmaz Driving License ID: 4141447 Start Date: 2021-12-28 Driving License Checked: True Rating: 4.0arrow_forwardAssignment 6: Creating the Babbage Bookkeeping Database Create a query to display the Client Number, Client Name, and Address fields for all clients with an address on Maum. Save the query as “Q22-Client-Maum Query.” Create a query that will allow the user to enter the city to search when the query is run. The query results should display the Client Number, Client Name, and Bookkeeper Number. Test the query by searching for those records where the client is located in Portage. Save the query as “Q23-Client-City Query.” Create a query from the Client table to display the cities in ascending order. Each city should appear only once (i.e., no repeating city). Save the query as “Q24-City-Sorting Query.” Create a query to display the Client Number, Client Name, and Balance fields for all clients where the bookkeeper number is 24 or 34 and the balance is greater than $300.00. Save the query as “Q25-Client-Bookkeeper24-34 Query.” Create a query to display the First Name,…arrow_forwardCreate a set of lookup tables.arrow_forward
- Trigger pleasearrow_forwardplz quickly ?????????????? /*Inserting into patient table*/ INSERT INTO patientVALUES ('1234','Kim Minji','06-05-1994','0557375017'); INSERT INTO patientVALUES ('1334','Han Sohee','06-07-1996','0567374017'); INSERT INTO patientVALUES ('1434','Jeon soyeon','07-10-1998','0537372017'); INSERT INTO patientVALUES ('1646','Lee Taemin','18-06-1993','0501346257'); INSERT INTO patientVALUES ('1645','Yu jimin','11-09-2000','0501846257'); select*from patient; /*Inserting into Doctor table*/INSERT INTO DOCTOR VALUES(2000432, 'khaled' , '05-12-1994' , 0556677880,'Dermatologists'); INSERT INTO DOCTOR VALUES(2000509, 'Ali' , '09-01-2000' , 0559918100, 'Dentistry'); INSERT INTO DOCTOR VALUES(2000389, 'Lewis' ,'21-01-1996' , 0559910000,'Family Physicians'); INSERT INTO DOCTOR VALUES(2000504, 'Saleh' ,'16-06-1998' , 055611500,'Family Physicians'); INSERT INTO DOCTOR VALUES(2000235, 'sara' ,'22-06-1998', 0557745500,'Orthopedics'); select *from doctor; /*Inserting into appointment table*/ INSERT INTO…arrow_forwardTopic: Databse Prompt: Transform as necessary and then write the XML elements to the appropriate tables in the database.Build SQL chunks for the following queries: What are the titles and prices of all books written by "Galos, Mike"? List the titles and the prices. What is the most recent year of publication of all books written by "O'Brien, Tim". What is the average price of all books in the "Fantasy" genre. Find the number of books in each genre. List the title and author of all books that cost less than the average price of books. XML Syntax: <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description></description> </book> <book id="bk102"> <author>Ralls, Kim</author> <title>Midnight…arrow_forward
- Modify the Job_class column of the EMPLOYEES table so that it allows storing a maximum width of two characters.arrow_forwardThe SERVICE_REQUEST table uses the CHAR data type for the DESCRIPTION and STATUS fields. Is there an alternate data type that could be used to store the values in these fields? Justify your reason for choosing an alternate data type or for leaving the data type as CHAR.arrow_forwardDelete the BOOK_PRICING table permanently so that it isnt moved to the recycle bin. Delete the JL_EMPS table so that it can be restored. Restore the JL_EMPS table and verify that its available again.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY